Files
kotlin/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt
2018-06-28 12:26:41 +02:00

27 lines
402 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
inline fun test(s: () -> Int): Int =
try {
val i = s()
i + 10
}
finally {
0
}
fun box() : String {
test {
try {
val p = 1
return "OK"
}
catch(e: Exception) {
-2
}
finally {
-3
}
}
return "Failed"
}