Created
September 15, 2013 23:13
-
-
Save avibryant/6575113 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> val x = null.asInstanceOf[Int] | |
x: Int = 0 | |
scala> Option(x) | |
res1: Option[Int] = Some(0) | |
scala> Option(null.asInstanceOf[Int]) | |
res2: Option[Int] = None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See SI-6710 and SI-6898 and the resulting puzzler "Cast Away" ;-)