Files
kotlin-fork/compiler/testData/diagnostics/tests/tailCalls/functionWithoutAnnotation.kt
T
2013-12-05 23:53:07 +04:00

6 lines
120 B
Kotlin

fun withoutAnnotation(x : Int) : Int {
if (x > 0) {
return 1 + withoutAnnotation(x - 1)
}
return 0
}