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
scala> def foo = { lazy val bar: Unit = { println("Hello") }; bar } def foo: Unit scala> bar // nothing happen
Given:
class Test { def foo = { lazy val bar: Unit = println("Hello") bar } }
After erasure:
class Test() { def foo(): Unit = { lazy <accessor> def bar(): scala.runtime.BoxedUnit = { println("Hello") scala.runtime.BoxedUnit$#UNIT } () // no more call to `bar` } }
The text was updated successfully, but these errors were encountered:
5994bfa
Merge pull request #5703 from dotty-staging/fix-#5350
c975760
Fix #5350: Fix purity of local lazy vals
No branches or pull requests
Given:
After erasure:
The text was updated successfully, but these errors were encountered: