JVM_IR KT-46189 lower tailrec functions after local declarations

This commit is contained in:
Dmitry Petrov
2021-04-20 19:02:49 +03:00
committed by TeamCityServer
parent 645014092c
commit f519150c08
11 changed files with 156 additions and 6 deletions
@@ -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"