Files
kotlin-fork/js/js.translator/testData/callableReference/function/cases/recursiveClosure.kt
T
2014-07-30 17:50:16 +04:00

11 lines
272 B
Kotlin

// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/local/.
package foo
fun foo(until: Int): String {
fun bar(x: Int): String =
if (x == until) "OK" else bar(x + 1)
return (::bar)(0)
}
fun box() = foo(10)