Remove finally marker at inlining

This commit is contained in:
Michael Bogdanov
2015-06-23 11:58:41 +03:00
parent a018e4e12a
commit b1c5002889
5 changed files with 76 additions and 6 deletions
@@ -0,0 +1,33 @@
inline fun test(s: ()->Int){
var i = 0;
try {
i = s()
i = i + 10
} finally {
//finallyStart
i
//finallyEnd
//and same markers in default catch handler
}
}
fun box() : String {
var p: Int = 1
test {
try {
p = 1
return "OK"
} catch(e: Exception) {
p = -1;
p
} finally {
p++
}
}
return "fail"
}
// 2 InlineMarker.finallyStart
// 2 InlineMarker.finallyEnd
// 4 InlineMarker