78ca733c38
except tests that are not possible to add without some modifications in the test infra. See todos on the commented-out test declarations
11 lines
315 B
Kotlin
Vendored
11 lines
315 B
Kotlin
Vendored
// IGNORE_BACKEND: JVM
|
|
// IGNORE_BACKEND_K2: JVM_IR, JS_IR
|
|
// FIR status: don't support legacy feature. UNINITIALIZED_PARAMETER y. See KT-49800
|
|
tailrec fun foo(x: () -> String? = { y }, y: String = "fail"): String? {
|
|
if (y == "start")
|
|
return foo()
|
|
return x()
|
|
}
|
|
|
|
fun box() = foo(y = "start") ?: "OK"
|