[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:
+2
-2
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user