Files
kotlin-fork/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt
T
2018-06-19 17:09:31 +03:00

6 lines
184 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 }