Files
kotlin-fork/compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt
T
2018-08-02 13:19:24 +02:00

20 lines
359 B
Kotlin
Vendored

// FILE: 1.kt
inline fun <R> performWithFinally(finally: () -> R) : R {
try {
throw RuntimeException("1")
} catch (e: RuntimeException) {
throw RuntimeException("2")
} finally {
return finally()
}
}
// FILE: 2.kt
inline fun test2Inline() = performWithFinally { "OK" }
fun box(): String {
return test2Inline()
}