Fix for 'null is Nothing' false-positive
This commit is contained in:
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user