Files
kotlin/compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixCall.kt
2015-09-04 17:23:26 +03:00

8 lines
185 B
Kotlin
Vendored

tailrec 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"