Always null detection

This commit is contained in:
Mikhail Glukhikh
2015-11-06 17:54:05 +03:00
parent ed1c94d0f9
commit 2d9fbf5696
40 changed files with 140 additions and 75 deletions
@@ -7,7 +7,7 @@ fun foo() {
val x: Int? = null
val a = Array<Int>(3, {0})
if (x != null) bar(a[<!DEBUG_INFO_SMARTCAST!>x<!>]) else bar(a[<!TYPE_MISMATCH!>x<!>])
if (x != null) bar(a[<!DEBUG_INFO_SMARTCAST!>x<!>]) else bar(a[<!ALWAYS_NULL, TYPE_MISMATCH!>x<!>])
bar(a[if (x == null) 0 else <!DEBUG_INFO_SMARTCAST!>x<!>])
bar(a[<!TYPE_MISMATCH!>x<!>])