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
In the following code the cast to Nothing does not throw the expected NullPointerException
NullPointerException
def f: Unit = { val a: Nothing = null.asInstanceOf[Nothing] // No exception }
but it does in
def f: Unit = { val a: Nothing = null.asInstanceOf[Nothing] println(a) // throws here }
def f: Unit = { val a: Int = null.asInstanceOf[Nothing] // throws here }
def f: Unit = { null.asInstanceOf[Nothing] // throws here }
This issue was metioned prevoiusly in #1002.
The text was updated successfully, but these errors were encountered:
with -optimise throws, that was how I discovered the issue.
-optimise
Sorry, something went wrong.
Fix scala#3340: Always throw when casting to scala.Nothing
80338e9
Also fix scala#4410
81d1243
Add test for scala#3340 with a side effect
2b74394
2793b75
Merge pull request #5874 from dotty-staging/fix-#3340
cf6e7a9
Fix #3340: Always throw when casting to scala.Nothing
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
In the following code the cast to Nothing does not throw the expected
NullPointerException
but it does in
This issue was metioned prevoiusly in #1002.
The text was updated successfully, but these errors were encountered: