Fix for wrong local variable table at inlining lambda with finallies

This commit is contained in:
Michael Bogdanov
2015-10-02 11:50:59 +03:00
parent 8ab746d6a3
commit e91c556d06
6 changed files with 65 additions and 6 deletions
@@ -0,0 +1,35 @@
import test.*
fun test1(): String {
try {
doCall {
try {
doCall {
val a = 1
if (1 == 1) {
return "a"
}
else if (2 == 2) {
return "b"
}
}
return "d"
}
finally {
"1"
}
}
}
finally {
"2"
}
return "f"
}
fun box(): String {
test1()
return "OK"
}
@@ -0,0 +1,5 @@
package test
public inline fun <R> doCall(block: ()-> R) : R {
return block()
}