Fix of getCorrespondingLoop for complex loop / try-finally trees #KT-8246 Fixed

This commit is contained in:
Mikhail Glukhikh
2016-03-25 19:32:50 +03:00
parent f385c85672
commit b7e8f71367
19 changed files with 561 additions and 16 deletions
@@ -0,0 +1,33 @@
== test ==
fun test() {
while (true) {
class LocalClass(val x: Int) {
init {
break
}
constructor() : this(42) {
break
}
fun foo() {
break
}
}
}
}
---------------------
<v1>: * NEW: magic[VALUE_CONSUMER](true|<v0>) -> <v1>
<v2>: Int NEW: magic[FAKE_INITIALIZER](val x: Int) -> <v2>
true <v0>: Boolean NEW: r(true) -> <v0>
break !<v3>: *
{ break } !<v3>: * COPY
while (true) { class LocalClass(val x: Int) { init { break } constructor() : this(42) { break } fun foo() { break } } } !<v4>: *
{ while (true) { class LocalClass(val x: Int) { init { break } constructor() : this(42) { break } fun foo() { break } } } } !<v4>: * COPY
=====================
== foo ==
fun foo() {
break
}
---------------------
break !<v0>: *
{ break } !<v0>: * COPY
=====================