Files
kotlin/compiler/testData/codegen/box/jvmField/annotationCompanionWithJava.kt
2019-11-19 11:00:09 +03:00

31 lines
466 B
Kotlin
Vendored

// !LANGUAGE: +JvmFieldInInterface +NestedClassesInAnnotations
// IGNORE_BACKEND_FIR: JVM_IR
// 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()
}