Fixes for call site finally generation before non-local returns

This commit is contained in:
Michael Bogdanov
2014-10-28 14:16:47 +03:00
parent dd8c3f0e49
commit d0f6f03380
12 changed files with 625 additions and 233 deletions
@@ -25,31 +25,5 @@ fun box() : String {
return "fail"
}
// maybe we shouldinline fun test(s: ()->Int): Int {
var i = 0;
try {
i = s()
i = i + 10
} finally {
return i
}
}
fun box() : String {
var p: Int = 1
test {
try {
p = 1
return "OK" //finally from inline fun doen't split this try
} catch(e: Exception) {
p = -1;
p
} finally {
p++
}
}
return "fail"
}
check test data
// maybe we should check test data
// 13 TRYCATCHBLOCK