Files
kotlin-fork/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt
T
2021-09-08 19:56:38 +03:00

7 lines
185 B
Kotlin
Vendored

fun zap(s: String) = s
inline fun tryZap(string: String, fn: (String) -> String) =
fn(try { zap(string) } catch (e: Exception) { "" })
fun box(): String = tryZap("OK") { it }