mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
23 lines
357 B
Kotlin
Vendored
23 lines
357 B
Kotlin
Vendored
// !LANGUAGE: +JvmFieldInInterface
|
|
// IGNORE_BACKEND: JVM_IR
|
|
// TARGET_BACKEND: JVM
|
|
// IGNORE_BACKEND: JS
|
|
// IGNORE_BACKEND: JS_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
|
|
}
|