Take into account data flow info changes for special call (if/when/elvis/!!) arguments #KT-10824 Fixed

Smart casts on complex expressions look as no more possible
This commit is contained in:
Mikhail Glukhikh
2016-01-28 14:19:45 +03:00
parent 7c59592212
commit ed8ccdc15a
15 changed files with 117 additions and 25 deletions
@@ -1,11 +1,11 @@
fun baz(s: String?, b: Boolean?): String {
val t = if (if (b == null) return "" else <!DEBUG_INFO_SMARTCAST!>b<!>) {
if (s == null) return ""
s
<!DEBUG_INFO_SMARTCAST!>s<!>
}
else {
if (s != null) return <!DEBUG_INFO_SMARTCAST!>s<!>
""
}
return <!DEBUG_INFO_SMARTCAST!>t<!>
return t
}