blob: fae1c2b702f99a8329c38d367c7f9a3036418559 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
object Test {
def bar(s: String) = s;
val o: Option[Null] = None
def nullReference {
val a: Null = o.get
bar(a) // Was: VerifyError under GenICode
}
def literal {
val a: Null = null
bar(a)
}
def main(args: Array[String]) = {
try { nullReference } catch { case _: NoSuchElementException => }
literal
}
}
|