Files
kotlin-fork/compiler/testData/debug/stepping/functionCallWithLambdaParam.kt
T
Alexander Udalov 3f034e8b67 Enable lightweight lambdas (aka invokedynamic) since 2.0
#KT-45375 Fixed
 #KT-58173 Open
2024-02-08 19:46:18 +00:00

71 lines
1.2 KiB
Kotlin
Vendored

// FILE: test.kt
fun box() {
foo({
val a = 1
})
foo() {
val a = 1
}
}
fun foo(f: () -> Unit) {
f()
}
// EXPECTATIONS ClassicFrontend JVM_IR
// test.kt:5 box
// test.kt:15 foo
// test.kt:6 invoke
// test.kt:7 invoke
// test.kt:15 foo
// test.kt:16 foo
// test.kt:9 box
// test.kt:15 foo
// test.kt:10 invoke
// test.kt:11 invoke
// test.kt:15 foo
// test.kt:16 foo
// test.kt:12 box
// EXPECTATIONS FIR JVM_IR
// test.kt:5 box
// test.kt:15 foo
// test.kt:6 box$lambda$0
// test.kt:7 box$lambda$0
// test.kt:15 foo
// test.kt:16 foo
// test.kt:5 box
// test.kt:9 box
// test.kt:15 foo
// test.kt:10 box$lambda$1
// test.kt:11 box$lambda$1
// test.kt:15 foo
// test.kt:16 foo
// test.kt:12 box
// EXPECTATIONS JS_IR
// test.kt:5 box
// test.kt:15 foo
// test.kt:6 box$lambda
// test.kt:7 box$lambda
// test.kt:16 foo
// test.kt:9 box
// test.kt:15 foo
// test.kt:10 box$lambda
// test.kt:11 box$lambda
// test.kt:16 foo
// test.kt:12 box
// EXPECTATIONS WASM
// test.kt:1 $box
// test.kt:5 $box
// test.kt:15 $foo (4, 4)
// test.kt:6 $box$lambda.invoke (20, 12, 21)
// test.kt:16 $foo (1, 1)
// test.kt:9 $box
// test.kt:10 $box$lambda.invoke (16, 8, 17)
// test.kt:12 $box