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

13 lines
227 B
Kotlin

tailRecursive fun test(x : Int = 0, e : Any = "a") {
if (!e.equals("a")) {
throw IllegalArgumentException()
}
if (x > 0) {
test(x - 1)
}
}
fun box() : String {
test(100000)
return "OK"
}