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
@@ -2,9 +2,9 @@ package test;
|
||||
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
|
||||
@Anno(value = "anno-class")
|
||||
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
|
||||
@kotlin.Metadata()
|
||||
public abstract @interface Anno {
|
||||
|
||||
public abstract java.lang.String value();
|
||||
@@ -16,8 +16,8 @@ package test;
|
||||
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.jvm.JvmName(name = "AnnotationsTest")
|
||||
@kotlin.Metadata()
|
||||
@kotlin.jvm.JvmName(name = "AnnotationsTest")
|
||||
public final class AnnotationsTest {
|
||||
|
||||
public AnnotationsTest() {
|
||||
@@ -25,8 +25,8 @@ public final class AnnotationsTest {
|
||||
}
|
||||
|
||||
@Anno(value = "top-level-fun")
|
||||
public static final void topLevelFun(@org.jetbrains.annotations.NotNull()
|
||||
@Anno(value = "top-level-fun-receiver")
|
||||
public static final void topLevelFun(@Anno(value = "top-level-fun-receiver")
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
java.lang.String $this$topLevelFun) {
|
||||
}
|
||||
|
||||
@@ -48,8 +48,8 @@ package test;
|
||||
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
@Anno(value = "enum")
|
||||
@kotlin.Metadata()
|
||||
public enum Enum {
|
||||
@Anno(value = "white")
|
||||
/*public static final*/ WHITE /* = new Enum() */,
|
||||
@@ -73,21 +73,21 @@ package test;
|
||||
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
@Anno(value = "clazz")
|
||||
@kotlin.Metadata()
|
||||
public abstract class Test {
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private java.lang.String v;
|
||||
|
||||
@Anno(value = "test-constructor")
|
||||
protected Test(@org.jetbrains.annotations.NotNull()
|
||||
@Anno(value = "v-param")
|
||||
protected Test(@Anno(value = "v-param")
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
java.lang.String v) {
|
||||
super();
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
@Anno(value = "v-get")
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public final java.lang.String getV() {
|
||||
return null;
|
||||
}
|
||||
@@ -98,13 +98,13 @@ public abstract class Test {
|
||||
}
|
||||
|
||||
@Anno(value = "v-set")
|
||||
public final void setV(@org.jetbrains.annotations.NotNull()
|
||||
@Anno(value = "v-setparam")
|
||||
public final void setV(@Anno(value = "v-setparam")
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
java.lang.String p0) {
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
@Anno(value = "abstract-method")
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public abstract java.lang.String abstractMethod();
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
|
||||
Reference in New Issue
Block a user