Files
kotlin/compiler/testData/codegen/box/callableReference/bound/boundJvmFieldInInterfaceCompanion.kt
2019-11-19 11:00:09 +03:00

21 lines
314 B
Kotlin
Vendored

// !LANGUAGE: +JvmFieldInInterface
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// 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
}