Support @JvmField on interface properties

#KT-15807 Fixed
This commit is contained in:
Mikhael Bogdanov
2018-03-13 15:18:01 +01:00
parent 719c1882e0
commit 1d283d243e
36 changed files with 718 additions and 34 deletions
@@ -0,0 +1,32 @@
// !LANGUAGE: +JvmFieldInInterface
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: Test.java
public class Test {
public static String publicField() {
return Foo.o.getS() + Foo.k.getS();
}
}
// FILE: simple.kt
public class Bar(public val s: String)
interface Foo {
companion object {
@JvmField
val o = Bar("O")
@JvmField
val k = Bar("K")
}
}
fun box(): String {
return Test.publicField()
}