[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
+4 -5
View File
@@ -10,11 +10,11 @@ fun box(): String {
val y = "y"
return "FAIL1"
} finally {
return "FAIL2" // TODO: `e` should not be visible here.
return "FAIL2"
}
}
} finally {
return "OK" // TODO: `e` should not be visible here.
return "OK"
}
return "FAIL3"
}
@@ -31,6 +31,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:13 box: i:int=0:int, e:java.lang.Exception=java.lang.RuntimeException
// test.kt:17 box: e:java.lang.Exception=java.lang.RuntimeException
// test.kt:13 box: i:int=0:int
// test.kt:17 box: