mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
27 lines
402 B
Kotlin
Vendored
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"
|
|
}
|