JVM IR: minor, sort ElementType fields as in the old backend
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.
This commit is contained in:
@@ -11,12 +11,9 @@ 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
|
||||
if (targets.size != 2) {
|
||||
return targets.toList().toString()
|
||||
}
|
||||
if (targets.toSet() != setOf(java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD)) {
|
||||
return targets.toList().toString()
|
||||
val targets = targetAnn.value.toList()
|
||||
if (targets != listOf(java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD)) {
|
||||
return targets.toString()
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user