19 lines
303 B
Kotlin
Vendored
19 lines
303 B
Kotlin
Vendored
// DONT_TARGET_EXACT_BACKEND: WASM
|
|
// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED
|
|
fun a(): IntArray? = null
|
|
|
|
fun b(): Nothing = throw Exception()
|
|
|
|
fun foo(): IntArray = a() ?: b()
|
|
|
|
|
|
fun box(): String {
|
|
try {
|
|
foo()
|
|
} catch (e: Exception) {
|
|
return "OK"
|
|
}
|
|
|
|
return "Fail"
|
|
}
|