e399b4cd12
In the old backend, targets are generated in the order of their declaration in the ElementType enum, see AnnotationCodegen.java:306 (EnumSet guarantees such iteration ordering). This has no effect other than reducing non-essential differences when comparing ABI of JVM vs JVM_IR.
20 lines
611 B
Kotlin
Vendored
20 lines
611 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
// WITH_RUNTIME
|
|
// FULL_JDK
|
|
|
|
@Target(
|
|
AnnotationTarget.FUNCTION, AnnotationTarget.FIELD,
|
|
AnnotationTarget.PROPERTY, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER
|
|
)
|
|
public annotation class TestAnn
|
|
|
|
fun box(): String {
|
|
val testAnnClass = TestAnn::class.java
|
|
val targetAnn = testAnnClass.getAnnotation(java.lang.annotation.Target::class.java)
|
|
val targets = targetAnn.value.toList()
|
|
if (targets != listOf(java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD)) {
|
|
return targets.toString()
|
|
}
|
|
return "OK"
|
|
}
|