Files
kotlin-fork/compiler/testData/checkLocalVariablesTable/itInLambda.kt
T
Alexander Udalov d757847ed6 JVM: enable -Xlambdas=class for some backend tests
These tests are checking the specifics of the class-generated lambdas.
2023-05-12 15:21:00 +00:00

18 lines
373 B
Kotlin
Vendored

// LAMBDAS: CLASS
public fun <T> Iterable<T>.myforEach(operation: (T) -> Unit) : Unit {
for (element in this) operation(element)
}
public fun println(v: Any?) {}
fun foo1() {
(1..5).myforEach {
println(it)
}
}
// METHOD : ItInLambdaKt$foo1$1.invoke(I)V
// VARIABLE : NAME=this TYPE=LItInLambdaKt$foo1$1; INDEX=0
// VARIABLE : NAME=it TYPE=I INDEX=1