Files
kotlin-fork/compiler/testData/codegen/box/functions/nothisnoclosure.kt
T
2018-06-28 12:26:41 +02:00

18 lines
260 B
Kotlin
Vendored

// IGNORE_BACKEND: 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"
}