Files
kotlin/compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixCall.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

8 lines
191 B
Kotlin

tailRecursive fun Int.test(x : Int) : Int {
if (this > 1) {
return (this - 1) test x
}
return this
}
fun box() : String = if (1000000.test(1000000) == 1) "OK" else "FAIL"