We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
=== What steps will reproduce the problem? ===
scala> object test { | import A._ | class A(b: B = new A.B()) | object A { | class B | new A() // found : test.A#B, required: test.A.B | } | } <console>:12: error: type mismatch; found : test.A#B required: test.A.B Error occurred in an application involving default arguments. new A() // found : test.A#B, required: test.A.B ^
=== What is the expected behavior? ===
scala> object test { | class A(b: A.B = new A.B()) | object A { | class B | new A() // okay | } | } defined module test scala> scala> object test { | import A._ | class A(b: B) | object A { | class B | new A(new B()) // okay | } | } defined module test scala> scala> object test { | import C._ | class A(b: B = new C.B()) | object C { | class B | new A() // okay | } | } defined module test
It seems to need the combination of the companion object and an import to trigger the problem.
=== What versions of the following are you using? ===
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-4524?orig=1 Reporter: @retronym
Sorry, something went wrong.
@magarciaEPFL said:
[[syntax trees at end of typer]]// Scala source: bt4.scala package <empty> { final object test extends System.Object with ScalaObject { def this(): object test = { test.super.this(); () }; import test.this.A._; class A extends System.Object with ScalaObject { <paramaccessor> private[this] val b: test.A.B = _; def this(b: test.A.B = new test.this.A.B()): test.A = { A.super.this(); () } }; final object A extends System.Object with ScalaObject { def this(): object test.A = { A.super.this(); () }; class B extends System.Object with ScalaObject { def this(): test.A.B = { B.super.this(); () } }; new test.this.A(test.this.A.<error: method init$$default$$1>); <synthetic> def init$$default$$1: test.A.B @scala.annotation.unchecked.uncheckedVariance = new test.this.A.B() } } } one error found
@lrytz said: (In r24888) close #4524 and close #4425, review by odersky.
lrytz
No branches or pull requests
=== What steps will reproduce the problem? ===
=== What is the expected behavior? ===
It seems to need the combination of the companion object and an import to trigger the problem.
=== What versions of the following are you using? ===
The text was updated successfully, but these errors were encountered: