Files
kotlin-fork/compiler/testData/codegen/box/annotations/fileClassWithFileAnnotation.kt
T
2019-09-18 14:05:28 +02:00

13 lines
333 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// WITH_RUNTIME
@file:StringHolder("OK")
@file:JvmName("FileClass")
@Target(AnnotationTarget.FILE)
@Retention(AnnotationRetention.RUNTIME)
public annotation class StringHolder(val value: String)
fun box(): String =
Class.forName("FileClass").getAnnotation(StringHolder::class.java)?.value ?: "null"