Files
kotlin/compiler/testData/codegen/bytecodeText/inline/splitedExceptionTable.kt
2014-10-29 17:04:10 +03:00

30 lines
474 B
Kotlin

inline fun test(s: ()->Int){
var i = 0;
try {
i = s()
i = i + 10
} finally {
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"
}
// maybe we should check test data
// 13 TRYCATCHBLOCK