mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
23 lines
443 B
Kotlin
Vendored
23 lines
443 B
Kotlin
Vendored
// !LANGUAGE: -InlineConstVals
|
|
// IGNORE_BACKEND: JVM_IR
|
|
// FILE: Foo.kt
|
|
|
|
private const val OUTER_PRIVATE = 20
|
|
|
|
class Foo {
|
|
companion object {
|
|
private const val LOCAL_PRIVATE = 20
|
|
}
|
|
|
|
fun foo() {
|
|
// Access to the property use getstatic on the backed field
|
|
LOCAL_PRIVATE
|
|
// Access to the property requires an invokestatic
|
|
OUTER_PRIVATE
|
|
}
|
|
}
|
|
|
|
// 1 INVOKESTATIC
|
|
// 1 PUTSTATIC
|
|
// 2 GETSTATIC
|