Partial body resolve correctly handles elvis operator

This commit is contained in:
Valentin Kipyatkov
2015-03-24 22:35:18 +03:00
parent 176ba937ba
commit f3799a0ce7
6 changed files with 46 additions and 2 deletions
@@ -0,0 +1,6 @@
Resolve target: value-parameter val p1: kotlin.Any?
----------------------------------------------
fun foo(p1: Any?, p2: Any) {
/* STATEMENT DELETED: print(p1 ?: p2) */
<caret>p1?.hashCode()
}
@@ -0,0 +1,4 @@
fun foo(p1: Any?, p2: Any) {
print(p1 ?: p2)
<caret>p1?.hashCode()
}
@@ -0,0 +1,6 @@
Resolve target: value-parameter val p: kotlin.Any? smart-cast to kotlin.Any
----------------------------------------------
fun foo(p: Any?) {
print(p ?: return)
<caret>p.hashCode()
}
@@ -0,0 +1,4 @@
fun foo(p: Any?) {
print(p ?: return)
<caret>p.hashCode()
}