Skip to content

Instantly share code, notes, and snippets.

@alaz
Created August 11, 2010 12:59
Show Gist options
  • Save alaz/518933 to your computer and use it in GitHub Desktop.
Save alaz/518933 to your computer and use it in GitHub Desktop.
class A {
val initVal: String = "aa"
def useInitVal { println(initVal) }
useInitVal
}
class B extends A {
override val initVal = "bb"
}
new B // enjoy "null"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment