JVM_IR KT-46189 lower tailrec functions after local declarations
This commit is contained in:
committed by
TeamCityServer
parent
645014092c
commit
f519150c08
@@ -0,0 +1,16 @@
|
||||
// IGNORE_BACKEND: WASM
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
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"
|
||||
Reference in New Issue
Block a user