Files
kotlin-fork/js/js.translator/testData/box/callableReference/function/recursiveClosure.kt
T
2018-04-27 20:02:59 +03:00

12 lines
296 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1111
// 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)