Partial body resolve: more precise smart casts analysis for if-statement
This commit is contained in:
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user