mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
14 lines
264 B
Kotlin
Vendored
14 lines
264 B
Kotlin
Vendored
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
|
|
|
fun withoutAnnotation(x : Int) : Int {
|
|
if (x > 0) {
|
|
return 1 + withoutAnnotation(x - 1)
|
|
}
|
|
return 0
|
|
}
|
|
|
|
fun box(): String {
|
|
val r = withoutAnnotation(10)
|
|
if (r == 10) return "OK"
|
|
return "Fail $r"
|
|
} |