Files
kotlin/compiler/testData/codegen/box/specialBuiltins/throwable.kt

12 lines
221 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
fun box(): String {
try {
throw Throwable("OK", null)
} catch (t: Throwable) {
if (t.cause != null) return "fail 1"
return t.message!!
}
return "fail 2"
}