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

10 lines
177 B
Kotlin

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