Partial body resolve: more efficient handling if-statements
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
Resolve target: val x: kotlin.Any?
|
||||
Skipped statements:
|
||||
if (x == null) { print(1) if (f()) return }
|
||||
@@ -0,0 +1,13 @@
|
||||
fun foo() {
|
||||
for (i in 1..10) {
|
||||
val x = take()
|
||||
if (x == null) {
|
||||
print(1)
|
||||
if (f()) return
|
||||
}
|
||||
<caret>x.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
fun take(): Any? = null
|
||||
fun f(): Boolean{}
|
||||
@@ -0,0 +1,3 @@
|
||||
Resolve target: val x: kotlin.Any?
|
||||
Skipped statements:
|
||||
if (x == null) { print(1) if (f()) { return } else { print(2) } }
|
||||
@@ -0,0 +1,18 @@
|
||||
fun foo() {
|
||||
for (i in 1..10) {
|
||||
val x = take()
|
||||
if (x == null) {
|
||||
print(1)
|
||||
if (f()) {
|
||||
return
|
||||
}
|
||||
else {
|
||||
print(2)
|
||||
}
|
||||
}
|
||||
<caret>x.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
fun take(): Any? = null
|
||||
fun f(): Boolean{}
|
||||
Reference in New Issue
Block a user