Files
kotlin-fork/compiler/testData/codegen/box/defaultArguments/useNextParamInLambda.kt
T
Igor Chevdar f413da3e58 Turned off test for native
It fixes current JVM BE behavior but seems like this should've been a FE error.
2019-10-28 12:38:19 +03:00

16 lines
327 B
Kotlin
Vendored

// IGNORE_BACKEND: JS, JS_IR, NATIVE
fun f(
f1: () -> String = { f2() },
f2: () -> String = { "Fail: should not be called" }
): String = f1()
fun box(): String {
try {
f()
return "Fail: f() should have thrown NPE"
} catch (e : Exception) {
}
return f(f2 = { "O" }) + f(f1 = { "K" })
}