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
@@ -0,0 +1,11 @@
fun foo(): String {
var s: String?
s = null
<!ALWAYS_NULL!>s<!>?.length
if (<!ALWAYS_NULL!>s<!> == null) s = "z"
var t: String? = "y"
if (t == null) t = "x"
var x: Int? = null
if (x == null) <!TYPE_MISMATCH!><!DEBUG_INFO_SMARTCAST!>x<!> += null<!>
return <!DEBUG_INFO_SMARTCAST!>t<!> + s
}