Files
kotlin-fork/compiler/testData/codegen/bytecodeText/companion/kt14258_1.kt
T
pyos fc6b03b08f JVM_IR: move const initialization handling to lowering
Had to edit some bytecodeText tests to account for the fact that JVM_IR
no longer generates explicit initializations for ConstantValue fields,
but NoConstantValueAttributeForNonConstVals is not the default yet.
2019-11-29 16:49:52 +01:00

15 lines
414 B
Kotlin
Vendored

// Checks that methods 'access$getMy$p', 'access$getMy$cp' and 'getMy' are not generated and
// that backed field 'my' is directly used through a 'getstatic'
class My {
companion object {
private val my: String = "OK"
}
fun getMyValue() = my
}
// 1 GETSTATIC My.my
// 0 INVOKESTATIC My\$Companion.access\$getMy\$p
// 0 INVOKESTATIC My.access\$getMy\$cp
// 0 INVOKESPECIAL My\$Companion.getMy