KAPT: Preserve the order of annotations in the stubs
Previously the annotations were included in reverse order. With this change they are kept in the same order as in the source file. This changes the test case for KT-23427 but that issue seems to relate to annotation arguments that are missing, not the order of repeatable annotations. This fixes KT-51087
This commit is contained in:
committed by
Alexander Udalov
parent
6f5ffeb6bb
commit
dd051c1556
@@ -9,19 +9,8 @@ package test;
|
||||
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
|
||||
public abstract @interface MyAnnotation {
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
package test;
|
||||
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
@MyAnnotation()
|
||||
@kotlin.Metadata()
|
||||
public final class State {
|
||||
private final int someInt = 0;
|
||||
private final long someLong = 0L;
|
||||
@@ -52,3 +41,14 @@ public final class State {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
package test;
|
||||
|
||||
import java.lang.System;
|
||||
|
||||
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
|
||||
@kotlin.Metadata()
|
||||
public abstract @interface MyAnnotation {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user