Files
kotlin-fork/compiler/testData/codegen/box/callableReference/bound/boundJvmFieldInInterfaceCompanion.kt
T

21 lines
310 B
Kotlin
Vendored

// !LANGUAGE: +JvmFieldInInterface
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JVM_IR
// WITH_RUNTIME
class Bar(val value: String)
interface Foo {
companion object {
@JvmField
val z = Bar("OK")
}
}
fun box(): String {
val field = Foo.Companion::z
return field.get().value
}