[JVM_IR] Keep track of catch variable gaps.

This ensures that catch variables are not visible in duplicated
finally blocks generated at an exit within the catch variable
scope.

^KT-46449 Fixed
This commit is contained in:
Mads Ager
2021-06-14 13:16:41 +02:00
committed by max-kammerer
parent 6aba6ea670
commit ae03e2983d
5 changed files with 15 additions and 18 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ fun box(): String {
val z = "z"
break // TODO: why does the break not have a line number so we can stop on it?
} finally {
throw RuntimeException("$i") // TODO: `e` should not be visible here
throw RuntimeException("$i")
}
}
} finally {
@@ -32,5 +32,5 @@ fun box(): String {
// test.kt:9 box: i:int=0:int
// test.kt:10 box: i:int=0:int, e:java.lang.Exception=java.lang.RuntimeException
// test.kt:11 box: i:int=0:int, e:java.lang.Exception=java.lang.RuntimeException, y:java.lang.String="y":java.lang.String
// test.kt:14 box: i:int=0:int, e:java.lang.Exception=java.lang.RuntimeException
// test.kt:14 box: i:int=0:int
// test.kt:18 box: