Initialize 'source' property of FirCatch objects properly

^KT-56923: Fixed
^KT-56755: Fixed
This commit is contained in:
vladislav.grechko
2023-03-01 20:15:41 +01:00
committed by teamcity
parent 83845fbab5
commit 17e6099b53
16 changed files with 357 additions and 345 deletions
+29 -31
View File
@@ -1,5 +1,3 @@
// IGNORE_BACKEND_K2_LIGHT_TREE: JVM_IR
// Reason: KT-56755
// The old backend has `y` and `j` visible on the finally block.
// IGNORE_BACKEND: JVM
// WITH_STDLIB
@@ -36,36 +34,36 @@ fun box() {
}
// EXPECTATIONS JVM JVM_IR
// test.kt:34 box:
// test.kt:15 compute:
// test.kt:16 compute:
// test.kt:17 compute: y:int=42:int
// test.kt:18 compute: y:int=42:int, i:int=0:int
// test.kt:20 compute:
// test.kt:21 compute: e:java.lang.Exception=java.lang.RuntimeException
// test.kt:22 compute: e:java.lang.Exception=java.lang.RuntimeException, y:int=32:int
// test.kt:23 compute: e:java.lang.Exception=java.lang.RuntimeException, y:int=32:int, j:int=0:int
// test.kt:9 compute: e:java.lang.Exception=java.lang.RuntimeException, y:int=32:int, j:int=0:int, $i$f$f:int=0:int
// test.kt:24 compute: e:java.lang.Exception=java.lang.RuntimeException, y:int=32:int, j:int=0:int, $i$f$f:int=0:int, $i$a$-f-TestKt$compute$1:int=0:int
// test.kt:28 compute:
// test.kt:34 box:
// test.kt:35 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String
// test.kt:36 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String, localX:java.lang.String="OK":java.lang.String
// test.kt:32 box:
// test.kt:13 compute:
// test.kt:14 compute:
// test.kt:15 compute: y:int=42:int
// test.kt:16 compute: y:int=42:int, i:int=0:int
// test.kt:18 compute:
// test.kt:19 compute: e:java.lang.Exception=java.lang.RuntimeException
// test.kt:20 compute: e:java.lang.Exception=java.lang.RuntimeException, y:int=32:int
// test.kt:21 compute: e:java.lang.Exception=java.lang.RuntimeException, y:int=32:int, j:int=0:int
// test.kt:7 compute: e:java.lang.Exception=java.lang.RuntimeException, y:int=32:int, j:int=0:int, $i$f$f:int=0:int
// test.kt:22 compute: e:java.lang.Exception=java.lang.RuntimeException, y:int=32:int, j:int=0:int, $i$f$f:int=0:int, $i$a$-f-TestKt$compute$1:int=0:int
// test.kt:26 compute:
// test.kt:32 box:
// test.kt:33 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String
// test.kt:34 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String, localX:java.lang.String="OK":java.lang.String
// EXPECTATIONS JS_IR
// test.kt:34 box:
// test.kt:16 compute:
// test.kt:17 compute: y=42:number
// test.kt:17 compute: y=42:number
// test.kt:17 compute: y=42:number
// test.kt:17 compute: y=42:number, i=0:number
// test.kt:32 box:
// test.kt:14 compute:
// test.kt:15 compute: y=42:number
// test.kt:15 compute: y=42:number
// test.kt:15 compute: y=42:number
// test.kt:15 compute: y=42:number, i=0:number
// test.kt:16 compute: y=42:number, i=0:number
// test.kt:18 compute: y=42:number, i=0:number
// test.kt:20 compute: y=42:number, i=0:number
// test.kt:20 compute: y=42:number, i=0:number
// test.kt:21 compute: y=42:number, i=0:number, e=kotlin.RuntimeException
// test.kt:22 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number
// test.kt:22 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number
// test.kt:22 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number
// test.kt:18 compute: y=42:number, i=0:number
// test.kt:19 compute: y=42:number, i=0:number, e=kotlin.RuntimeException
// test.kt:20 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number
// test.kt:20 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number
// test.kt:20 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number
// test.kt:20 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number, j=0:number
// test.kt:22 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number, j=0:number
// test.kt:24 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number, j=0:number
// test.kt:28 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number, j=0:number
// test.kt:26 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number, j=0:number