Files
kotlin-fork/compiler/testData/codegen/box/defaultArguments/kt36853.kt
T
2021-03-18 15:19:24 +03:00

20 lines
325 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR, WASM
interface IFoo {
fun foo(): String
}
tailrec fun tailrecDefault(
fake: Int,
x: IFoo = object : IFoo {
override fun foo(): String = "OK"
}
): String {
return if (fake == 0)
tailrecDefault(1)
else
x.foo()
}
fun box(): String = tailrecDefault(0)