Files
kotlin-fork/js/js.translator/testData/callableReference/function/cases/recursiveClosure.kt
T
2016-03-09 10:25:38 +03:00

11 lines
262 B
Kotlin
Vendored

// This test was adapted from compiler/testData/codegen/box/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)