Standard data flow analysis results are taken into account during condition analysis #KT-7933 Fixed

This commit is contained in:
Mikhail Glukhikh
2015-10-30 12:00:38 +03:00
parent dd1196ae6b
commit 182cde1e02
6 changed files with 114 additions and 4 deletions
@@ -0,0 +1,13 @@
class D(val a: String, val b: Boolean)
fun foo(p: Boolean, v: D?): String {
if (p && v!!.b) <!DEBUG_INFO_SMARTCAST!>v<!>.a
else v<!UNSAFE_CALL!>.<!>a
if (p && v!! == D("?", false)) <!DEBUG_INFO_SMARTCAST!>v<!>.a
else v<!UNSAFE_CALL!>.<!>a
if (p || v!!.b) v<!UNSAFE_CALL!>.<!>a
else <!DEBUG_INFO_SMARTCAST!>v<!>.a
if (p || v!! == D("?", false)) v<!UNSAFE_CALL!>.<!>a
else <!DEBUG_INFO_SMARTCAST!>v<!>.a
return ""
}