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

7 lines
209 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
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 }