Files
kotlin-fork/compiler/testData/codegen/box/controlStructures/kt2577.kt
T
2020-11-09 16:04:43 +03:00

15 lines
279 B
Kotlin
Vendored

// DONT_TARGET_EXACT_BACKEND: WASM
// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED
fun foo(): Int {
try {
} finally {
try {
return 1
} catch (e: Throwable) {
return 2
}
}
}
fun box() = if (foo() == 1) "OK" else "Fail"