7c63d50d1c
This is needed so that SharedVariablesLowering doesn't get confused, and SharedVariablesLowering should run after TailrecLowering to properly optimize tailrec calls in inline lambdas.
9 lines
192 B
Kotlin
Vendored
9 lines
192 B
Kotlin
Vendored
tailrec fun tailrecDefault(fake: Int, fn: () -> String = { "OK" }): String {
|
|
return if (fake == 0)
|
|
tailrecDefault(1)
|
|
else
|
|
fn()
|
|
}
|
|
|
|
fun box(): String = tailrecDefault(0)
|