Files
kotlin-fork/compiler/testData/codegen/box/callableReference/bound/boundJvmFieldInInterfaceCompanion.kt
T
2020-03-31 20:27:24 +03:00

20 lines
284 B
Kotlin
Vendored

// !LANGUAGE: +JvmFieldInInterface
// 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
}