Partial body resolve filter works more precisely for if-statements
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
Resolve target: value-parameter val p: kotlin.Any?
|
||||
----------------------------------------------
|
||||
fun foo(p: Any?) {
|
||||
/* STATEMENT DELETED: if (x(p == null)) { print("returned true") return } */
|
||||
<caret>p?.hashCode()
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun foo(p: Any?) {
|
||||
if (x(p == null)) {
|
||||
print("returned true")
|
||||
return
|
||||
}
|
||||
<caret>p?.hashCode()
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
Resolve target: value-parameter val p: kotlin.Any?
|
||||
----------------------------------------------
|
||||
fun foo(p: Any?) {
|
||||
/* STATEMENT DELETED: if (p is String) return */
|
||||
println(<caret>p.hashCode())
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
fun foo(p: Any?) {
|
||||
if (p is String) return
|
||||
println(<caret>p.hashCode())
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
Resolve target: value-parameter val p1: kotlin.Any?
|
||||
----------------------------------------------
|
||||
fun foo(p1: Any?, p2: Any?) {
|
||||
/* STATEMENT DELETED: if (p1 == null && p2 == null) { print("2 null's") return } */
|
||||
<caret>p1?.hashCode()
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun foo(p1: Any?, p2: Any?) {
|
||||
if (p1 == null && p2 == null) {
|
||||
print("2 null's")
|
||||
return
|
||||
}
|
||||
<caret>p1?.hashCode()
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
Resolve target: value-parameter val p1: kotlin.Any? smart-cast to kotlin.Any
|
||||
----------------------------------------------
|
||||
fun foo(p1: Any?, p2: Any?) {
|
||||
if (p1 == null || p2 == null) {
|
||||
/* STATEMENT DELETED: print("null") */
|
||||
return
|
||||
}
|
||||
<caret>p1.hashCode()
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun foo(p1: Any?, p2: Any?) {
|
||||
if (p1 == null || p2 == null) {
|
||||
print("null")
|
||||
return
|
||||
}
|
||||
<caret>p1.hashCode()
|
||||
}
|
||||
Reference in New Issue
Block a user