mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-18 00:21:35 +00:00
12 lines
245 B
Kotlin
Vendored
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"
|
|
} |