Files
kotlin-fork/compiler/testData/codegen/box/jvmField/annotationCompanionWithJava.kt
T
Jinseong Jeon dc2226b42f FIR2IR: put @JvmField on field, not property
#KT-42118 fixed
2020-09-25 14:45:48 +03:00

30 lines
436 B
Kotlin
Vendored

// !LANGUAGE: +JvmFieldInInterface +NestedClassesInAnnotations
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: Test.java
public class Test {
public static String publicField() {
return Foo.z.getS();
}
}
// FILE: simple.kt
public class Bar(public val s: String)
annotation class Foo {
companion object {
@JvmField
val z = Bar("OK")
}
}
fun box(): String {
return Test.publicField()
}