a3e2d2804c
- Actualize muted K2 tests - Actualize muted K1 tests with module systems because legacy Wasm test infra had no respect for "// MODULE: ..." test directives
15 lines
422 B
Kotlin
Vendored
15 lines
422 B
Kotlin
Vendored
// TODO: muted automatically, investigate should it be ran for JS or not
|
|
// IGNORE_BACKEND: JS
|
|
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
|
|
|
tailrec fun test(counter : Int) : Int? {
|
|
if (counter < 0) return null
|
|
if (counter == 0) return 777
|
|
|
|
return <!NON_TAIL_RECURSIVE_CALL!>test<!>(-1) ?: <!NON_TAIL_RECURSIVE_CALL!>test<!>(-2) ?: test(counter - 1)
|
|
}
|
|
|
|
fun box() : String =
|
|
if (test(100000) == 777) "OK"
|
|
else "FAIL"
|