Files
kotlin-fork/compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLambda.kt
T
2018-06-28 12:26:41 +02:00

20 lines
390 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo()<!> {
bar {
<!NON_TAIL_RECURSIVE_CALL!>foo<!>()
}
}
fun bar(a: Any) {}
fun box(): String {
foo()
return "OK"
}