Files
kotlin-fork/compiler/testData/codegen/regressions/kt2280.kt
T
Alexander Udalov dcd5cad427 KT-2280 Recursive function declared in function results in VerifyError
#KT-2280 Fixed

A closure's constructor should not take an instance of itself as an
argument, because it would require caller to pass yet uninitialized
value. Instead it should initialize a corresponding field with 'this'
2012-07-31 19:38:14 +04:00

8 lines
110 B
Kotlin

fun box(): String {
fun rmrf(i: Int) {
if (i > 0) rmrf(i - 1)
}
rmrf(5)
return "OK"
}