mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 00:21:35 +00:00
21 lines
314 B
Kotlin
Vendored
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
|
|
}
|