Skip to content

Instantly share code, notes, and snippets.

@razie
Created August 23, 2011 14:42
Show Gist options
  • Save razie/1165301 to your computer and use it in GitHub Desktop.
Save razie/1165301 to your computer and use it in GitHub Desktop.
When Option is null...
scala> class A { val x = Some(1); println (x) }
defined class A
scala> class B extends A { override val x = Some(2); println(x) }
defined class B
scala> new B
null
Some(2)
res1: B = B@48b89bc5
scala>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment