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

14 lines
328 B
Kotlin
Vendored

// DONT_TARGET_EXACT_BACKEND: WASM
// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED
fun test(): () -> Throwable {
return try {
TODO()
} catch (e: Throwable) {
{ -> e }
}
}
fun box(): String {
val exception = test()()
return if (exception is NotImplementedError) "OK" else "fail: $exception"
}