CFA: additional jumps to catch / finally generated in the end of try / before exits from try #KT-5469 Fixed
Also #KT-13612 Fixed (cherry picked from commit 7c188b3)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
43954699a7
commit
f8039249c6
+36
@@ -0,0 +1,36 @@
|
||||
fun f() {
|
||||
var foo = 1
|
||||
try {
|
||||
foo = 2
|
||||
throw RuntimeException()
|
||||
} catch (e: Throwable) {
|
||||
foo.hashCode()
|
||||
}
|
||||
throw Exception()
|
||||
}
|
||||
|
||||
fun g() {
|
||||
var foo = 1
|
||||
try {
|
||||
foo = 2
|
||||
f()
|
||||
} catch (e: Throwable) {
|
||||
foo.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
fun h() {
|
||||
try {
|
||||
|
||||
}
|
||||
finally {
|
||||
var foo = 1
|
||||
try {
|
||||
foo = 2
|
||||
g()
|
||||
}
|
||||
catch (e: Throwable) {
|
||||
foo.hashCode()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user