92cf521e11
Rely on the frontend weeding out cases that are not supported. In psi2ir, introduce all the parameters before processing default values. Change the DefaultArgumentStubGenerator to generate code that matches the behavior of the current backend.
17 lines
293 B
Kotlin
Vendored
17 lines
293 B
Kotlin
Vendored
// IGNORE_BACKEND: JS, JS_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" })
|
|
}
|