Files
kotlin-fork/js/js.translator/testData/box/callableReference/function/recursiveClosure.kt
T

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)