Files
kotlin-fork/compiler/testData/codegen/box/specialBuiltins/throwable.kt
T
2019-11-19 11:00:09 +03:00

12 lines
226 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_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"
}