Always null detection
This commit is contained in:
@@ -3,7 +3,7 @@ fun bar(x: Int): Int = x + 1
|
||||
fun foo() {
|
||||
val x: Int? = null
|
||||
while (x == null) {
|
||||
bar(<!TYPE_MISMATCH!>x<!>)
|
||||
bar(<!ALWAYS_NULL, TYPE_MISMATCH!>x<!>)
|
||||
}
|
||||
bar(<!DEBUG_INFO_SMARTCAST!>x<!>)
|
||||
|
||||
@@ -11,11 +11,11 @@ fun foo() {
|
||||
while (y != null) {
|
||||
bar(<!DEBUG_INFO_SMARTCAST!>y<!>)
|
||||
}
|
||||
bar(<!TYPE_MISMATCH!>y<!>)
|
||||
bar(<!ALWAYS_NULL, TYPE_MISMATCH!>y<!>)
|
||||
|
||||
val z: Int? = null
|
||||
while (z == null) {
|
||||
bar(<!TYPE_MISMATCH!>z<!>)
|
||||
bar(<!ALWAYS_NULL, TYPE_MISMATCH!>z<!>)
|
||||
break
|
||||
}
|
||||
bar(<!TYPE_MISMATCH!>z<!>)
|
||||
|
||||
Reference in New Issue
Block a user