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

11 lines
191 B
Kotlin

// !DIAGNOSTICS: -UNUSED_PARAMETER
tailRecursive fun Int.foo(x: Int) {
if (x == 0) return
val xx = x - 1
return 1 foo xx
}
fun box(): String {
1 foo 1000000
return "OK"
}