Support @JvmField on interface properties
#KT-15807 Fixed
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
// !LANGUAGE: +JvmFieldInInterface
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
import kotlin.reflect.full.memberProperties
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user