Files
kotlin-fork/compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInBlockInParentheses.kt
T
2020-11-09 16:04:43 +03:00

16 lines
249 B
Kotlin
Vendored

// DONT_TARGET_EXACT_BACKEND: WASM
// WASM_MUTE_REASON: UNIT_ISSUES
// DONT_RUN_GENERATED_CODE: JS
tailrec fun foo(x: Int) {
return if (x > 0) {
(foo(x - 1))
}
else Unit
}
fun box(): String {
foo(1000000)
return "OK"
}