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
def id[T](t: T) = t { if (x) id(one) else 0} + 1 { if (x) new scala.util.Random()}.asInstanceOf[Runnable]
After erasure both those if's have different types of branches:
{ if (x) id(box(one)) else 0} + 1 { if (x) new scala.util.Random() else ()}.asInstanceOf[Runnable]
In first example id should get unboxed, In the second example () should get boxed.
id
()
The text was updated successfully, but these errors were encountered:
0f78b20
Merge pull request scala#355 from scala/backport-lts-3.3-22975
07752e8
Backport "chore: remove all the warnings in the compiler codebase" to 3.3 LTS
Successfully merging a pull request may close this issue.
After erasure both those if's have different types of branches:
In first example
id
should get unboxed,In the second example
()
should get boxed.The text was updated successfully, but these errors were encountered: