Fix for 'null is Nothing' false-positive

This commit is contained in:
Andrey Breslav
2011-04-15 19:09:22 +04:00
parent 3678b343b6
commit fad3030e37
2 changed files with 9 additions and 2 deletions
@@ -151,3 +151,11 @@ fun foo(a : Nothing) : Unit {
fun fail() : Nothing {
throw new java.lang.RuntimeException()
}
fun nullIsNotNothing() : Unit {
val x : Int? = 1
if (x != null) {
return
}
fail()
}