Files
kotlin/compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt
2020-08-19 12:52:16 +03:00

12 lines
245 B
Kotlin
Vendored

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"
}