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

12 lines
331 B
Kotlin
Vendored

// DONT_TARGET_EXACT_BACKEND: WASM
// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED
class MyException(message: String): Exception(message)
fun box(): String =
"O" +
try {
try { throw Exception("oops!") } catch (mye: MyException) { "1" }
}
catch (e: Exception) {
"K"
}