mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-18 08:31:38 +00:00
JVM IR: Optimize static property references (KT-36975)
This commit is contained in:
committed by
Alexander Udalov
parent
669fda6b77
commit
4792be2522
10
compiler/testData/codegen/bytecodeText/callableReference/kt36975.kt
vendored
Normal file
10
compiler/testData/codegen/bytecodeText/callableReference/kt36975.kt
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
// FILE: test.kt
|
||||
class A(val value: String)
|
||||
|
||||
fun box(): String {
|
||||
val ref = A::value
|
||||
return ref(A("OK"))
|
||||
}
|
||||
|
||||
// Check that non-bound callable references are generated as singletons
|
||||
// 1 GETSTATIC TestKt\$box\$ref\$1.INSTANCE
|
||||
Reference in New Issue
Block a user