Limit "always null" scope: only for !!, is and dot; senseless comparison rolled back; "smart constant" information for nulls #KT-10029 Fixed

This commit is contained in:
Mikhail Glukhikh
2015-11-23 14:50:20 +03:00
parent db42941586
commit 89e56093a2
41 changed files with 323 additions and 151 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[<!ALWAYS_NULL, TYPE_MISMATCH!>x<!>])
if (x != null) bar(a[<!DEBUG_INFO_SMARTCAST!>x<!>]) else bar(a[<!TYPE_MISMATCH, DEBUG_INFO_CONSTANT!>x<!>])
bar(a[if (x == null) 0 else <!DEBUG_INFO_SMARTCAST!>x<!>])
bar(a[<!TYPE_MISMATCH!>x<!>])