Files
kotlin/compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInBlockInParentheses.kt
Svetlana Isakova b71260f54e Moved tests
that are used both for codegen & diagnostics to codegen/box/diagnostics
2014-11-21 14:02:45 +03:00

12 lines
155 B
Kotlin

tailRecursive fun foo(x: Int) {
return if (x > 0) {
(foo(x - 1))
}
else Unit
}
fun box(): String {
foo(1000000)
return "OK"
}