We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
A bug discovered by initialization checker:
// tests/pos/t704.scala trait D { private val x = "xxxx should appear twice" private object xxxx { Console.println(x) } def get_xxxx: AnyRef = xxxx } trait E extends D { def f(): Unit = { val y = "yyyy should appear twice" object yyyy { val x1 = get_xxxx Console.println(y) } yyyy } } class C extends E {} object Go extends D { def main(args : Array[String]): Unit = { new C().f() new C().f() } }
Compile and run the code with Dotty, it prints:
null null yyyy should appear twice null yyyy should appear twice
Scala 2.12 and 2.13 prints:
xxxx should appear twice yyyy should appear twice xxxx should appear twice yyyy should appear twice
Dotty should print the same as Scalac, which is in accord with language spec.
The text was updated successfully, but these errors were encountered:
1f92d31
Merge pull request #7435 from dotty-staging/fix-#7434
675779e
Fix #7434: Tighten a condition in LazyVals
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
A bug discovered by initialization checker:
minimized code
Compile and run the code with Dotty, it prints:
Scala 2.12 and 2.13 prints:
expectation
Dotty should print the same as Scalac, which is in accord with language spec.
The text was updated successfully, but these errors were encountered: