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
The decision was made some time back (1245, 668, 602) to support things like null.asInstanceOf[Int]. This prints 1 instead of failing:
object Main { def main(args: Array[String]) { val i: Int = null.asInstanceOf[Int] println(1 + i) } }
Please update the spec section 6.3 which currently reads
asInstanceOf[T ] returns the "null" object itself if T conforms to scala.AnyRef, and throws a NullPointerException otherwise.
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-4624?orig=1 Reporter: @LilyLambda Affected Versions: 2.9.0 See #4437
Sorry, something went wrong.
@paulp said: Duplicate of #4437.
paulp
No branches or pull requests
The decision was made some time back (1245, 668, 602) to support things like null.asInstanceOf[Int]. This prints 1 instead of failing:
Please update the spec section 6.3 which currently reads
The text was updated successfully, but these errors were encountered: