Fix of getCorrespondingLoop for complex loop / try-finally trees #KT-8246 Fixed
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
== foo ==
|
||||
fun foo() {
|
||||
outer@while (true) {
|
||||
try {
|
||||
while (true) {
|
||||
continue@outer
|
||||
}
|
||||
} finally {
|
||||
break
|
||||
}
|
||||
}
|
||||
println("OK")
|
||||
}
|
||||
---------------------
|
||||
<v1>: * NEW: magic[VALUE_CONSUMER](true|<v0>) -> <v1>
|
||||
<v3>: * NEW: magic[VALUE_CONSUMER](true|<v2>) -> <v3>
|
||||
true <v0>: Boolean NEW: r(true) -> <v0>
|
||||
true <v2>: Boolean NEW: r(true) -> <v2>
|
||||
continue@outer !<v5>: *
|
||||
{ continue@outer } !<v5>: * COPY
|
||||
while (true) { continue@outer } !<v6>: *
|
||||
{ while (true) { continue@outer } } !<v6>: * COPY
|
||||
break !<v4>: *
|
||||
{ break } !<v4>: * COPY
|
||||
try { while (true) { continue@outer } } finally { break } <v7>: * NEW: merge(try { while (true) { continue@outer } } finally { break }|!<v6>) -> <v7>
|
||||
{ try { while (true) { continue@outer } } finally { break } } <v7>: * COPY
|
||||
while (true) { try { while (true) { continue@outer } } finally { break } } !<v8>: *
|
||||
outer@while (true) { try { while (true) { continue@outer } } finally { break } } !<v8>: * COPY
|
||||
println !<v10>: *
|
||||
"OK" <v9>: * NEW: r("OK") -> <v9>
|
||||
println("OK") <v11>: * NEW: magic[UNRESOLVED_CALL](println("OK")|<v9>, !<v10>) -> <v11>
|
||||
{ outer@while (true) { try { while (true) { continue@outer } } finally { break } } println("OK") } <v11>: * COPY
|
||||
=====================
|
||||
== bar ==
|
||||
fun bar(): String {
|
||||
outer@while (true) {
|
||||
try {
|
||||
while (true) {
|
||||
continue@outer
|
||||
}
|
||||
} finally {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
---------------------
|
||||
<v1>: * NEW: magic[VALUE_CONSUMER](true|<v0>) -> <v1>
|
||||
<v3>: * NEW: magic[VALUE_CONSUMER](true|<v2>) -> <v3>
|
||||
true <v0>: Boolean NEW: r(true) -> <v0>
|
||||
true <v2>: Boolean NEW: r(true) -> <v2>
|
||||
continue@outer !<v6>: *
|
||||
{ continue@outer } !<v6>: * COPY
|
||||
while (true) { continue@outer } !<v7>: *
|
||||
{ while (true) { continue@outer } } !<v7>: * COPY
|
||||
"OK" <v4>: String NEW: r("OK") -> <v4>
|
||||
return "OK" !<v5>: *
|
||||
{ return "OK" } !<v5>: * COPY
|
||||
try { while (true) { continue@outer } } finally { return "OK" } <v8>: * NEW: merge(try { while (true) { continue@outer } } finally { return "OK" }|!<v7>) -> <v8>
|
||||
{ try { while (true) { continue@outer } } finally { return "OK" } } <v8>: * COPY
|
||||
while (true) { try { while (true) { continue@outer } } finally { return "OK" } } !<v9>: *
|
||||
outer@while (true) { try { while (true) { continue@outer } } finally { return "OK" } } !<v9>: * COPY
|
||||
{ outer@while (true) { try { while (true) { continue@outer } } finally { return "OK" } } } !<v9>: * COPY
|
||||
=====================
|
||||
Reference in New Issue
Block a user