Files
kotlin-fork/compiler/testData/ir/irText/declarations/parameters/useNextParamInLambda.kt
T
2021-03-12 18:47:34 +03:00

16 lines
293 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
fun f(
f1: () -> String = { f2() },
f2: () -> String = { "FAIL" }
): String = f1()
fun box(): String {
var result = "fail"
try {
f()
} catch (e : Exception) {
result = "OK"
}
return f(f2 = { "O" }) + f(f1 = { "K" })
}