Files
kotlin-fork/compiler/testData/codegen/bytecodeText/constClosureOptimization.kt
T
Alexander Udalov cd9209a7ee JVM: enable -Xlambdas=class in some codegen tests
Most of these tests check the specific structure of lambdas when they
are generated as classes, and they start to fail once invokedynamic
lambdas are enabled by default.
2023-04-28 21:34:19 +00:00

34 lines
762 B
Kotlin
Vendored

// LAMBDAS: CLASS
fun test() {
fun local(){
val lam = {
//static instance access
local()
}
lam()
}
//static instance access
val lam = {
//static instance access
local()
}
lam()
//static instance access
val cr = ::local
cr()
}
// JVM_TEMPLATES
// 3 GETSTATIC ConstClosureOptimizationKt\$test\$1\.INSTANCE
// 1 GETSTATIC ConstClosureOptimizationKt\$test\$lam\$1\.INSTANCE
// 1 GETSTATIC ConstClosureOptimizationKt\$test\$cr\$1\.INSTANCE
// JVM_IR_TEMPLATES
// 1 GETSTATIC ConstClosureOptimizationKt\$test\$cr\$1.INSTANCE
// 1 GETSTATIC ConstClosureOptimizationKt\$test\$lam\$1.INSTANCE
// 1 GETSTATIC ConstClosureOptimizationKt\$test\$local\$lam\$1.INSTANCE