Files
kotlin-fork/compiler/testData/codegen/box/functions/nothisnoclosure.kt
T
2019-11-19 11:00:09 +03:00

18 lines
264 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
fun foo(x: Int) {}
fun loop(times : Int) {
var left = times
while(left > 0) {
val u : (value : Int) -> Unit = {
foo(it)
}
u(left--)
}
}
fun box() : String {
loop(5)
return "OK"
}