Partial body resolve: more precise smart casts analysis for if-statement

This commit is contained in:
Valentin Kipyatkov
2014-11-18 14:29:01 +03:00
parent a675b5ba38
commit 5283b92269
6 changed files with 77 additions and 14 deletions
@@ -0,0 +1,3 @@
Resolve target: null
Skipped statements:
if (x()) { y(p!!) } else { z(p1!!) }
@@ -0,0 +1,10 @@
fun foo(p: Any?, p1, Any?) {
if (x()) {
y(p!!)
}
else {
z(p1!!)
}
<caret>xxx
}
@@ -0,0 +1,4 @@
Resolve target: value-parameter val p1: kotlin.Any? smart-casted to kotlin.Any
Skipped statements:
print(p!!)
print(p2!!)
@@ -0,0 +1,12 @@
fun foo(p: Any?, p1: Any?, p2: Any?) {
if (x()) {
print(p!!)
print(p1!!)
}
else {
print(p1 as String)
print(p2!!)
}
<caret>p1.hashCode()
}