ce7d8a6874
Split the ConstAndJvmFieldPropertiesLowering into two: ConstLowering which replaces const vals with their values, and PropertiesToFieldsLowering which removes unnecessary property accessors (such as for JvmField or private properties with default accessors) and replaces calls to those accessors with field access
16 lines
435 B
Kotlin
Vendored
16 lines
435 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
|
|
// 1 PUTSTATIC My.my
|
|
// 0 INVOKESTATIC My\$Companion.access\$getMy\$p
|
|
// 0 INVOKESTATIC My.access\$getMy\$cp
|
|
// 0 INVOKESPECIAL My\$Companion.getMy |