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.
14 lines
216 B
Kotlin
Vendored
14 lines
216 B
Kotlin
Vendored
class C
|
|
|
|
fun box(): String =
|
|
C().foo("O")
|
|
|
|
tailrec fun C.foo(
|
|
x: String,
|
|
f: (String) -> String = { bar(it) }
|
|
): String =
|
|
if (x.length < 2) foo(f(x)) else x
|
|
|
|
fun C.bar(s: String): String =
|
|
s + "K"
|