1844869e8a
Apparently it depended on the ordering of the synthetic `$annotations` methods generated for properties. And those methods were always generated at the end of a Java stub by kapt because they lacked PSI element, and thus `ClassFileToSourceStubConverter.convertClass` could not compute their source position, and it placed them at the end as all other synthetic methods. The solution is to provide PSI element for `$annotations` methods in JvmDeclarationOrigin. This origin is then collected in kapt in `OriginCollectingClassBuilderFactory` and used for sorting, as in the case of the old JVM backend. #KT-56360 Fixed
127 lines
2.8 KiB
Plaintext
Vendored
127 lines
2.8 KiB
Plaintext
Vendored
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
|
|
@kotlin.Metadata()
|
|
public abstract @interface Anno1 {
|
|
}
|
|
|
|
////////////////////
|
|
|
|
|
|
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
|
|
@kotlin.Metadata()
|
|
public abstract @interface Anno2 {
|
|
|
|
public abstract int i() default 5;
|
|
|
|
public abstract java.lang.String s() default "ABC";
|
|
|
|
public abstract int[] ii() default {1, 2, 3};
|
|
|
|
public abstract java.lang.String[] ss() default {"A", "B"};
|
|
|
|
public abstract Anno1 a();
|
|
|
|
public abstract Colors color() default Colors.BLACK;
|
|
|
|
public abstract Colors[] colors() default {Colors.BLACK, Colors.WHITE};
|
|
|
|
public abstract java.lang.Class<?> clazz();
|
|
|
|
public abstract java.lang.Class<?>[] classes();
|
|
}
|
|
|
|
////////////////////
|
|
|
|
|
|
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
|
|
@kotlin.Metadata()
|
|
public abstract @interface Anno3 {
|
|
|
|
public abstract java.lang.String value();
|
|
}
|
|
|
|
////////////////////
|
|
|
|
|
|
@kotlin.Metadata()
|
|
public enum Colors {
|
|
/*public static final*/ WHITE /* = new Colors() */,
|
|
/*public static final*/ BLACK /* = new Colors() */;
|
|
|
|
Colors() {
|
|
}
|
|
|
|
public static kotlin.enums.EnumEntries<Colors> getEntries() {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
////////////////////
|
|
|
|
|
|
@kotlin.Metadata()
|
|
public enum Enum1 {
|
|
/*public static final*/ BLACK /* = new Enum1() */,
|
|
@Anno1()
|
|
/*public static final*/ WHITE /* = new Enum1() */;
|
|
|
|
Enum1() {
|
|
}
|
|
|
|
public static kotlin.enums.EnumEntries<Enum1> getEntries() {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
////////////////////
|
|
|
|
|
|
@Anno1()
|
|
@Anno2(a = @Anno1(), clazz = TestAnno.class, classes = {TestAnno.class, Anno1.class})
|
|
@Anno3(value = "value")
|
|
@kotlin.Metadata()
|
|
public final class TestAnno {
|
|
|
|
public TestAnno() {
|
|
super();
|
|
}
|
|
}
|
|
|
|
////////////////////
|
|
|
|
|
|
@Anno3(value = "value")
|
|
@Anno2(i = 6, s = "BCD", ii = {4, 5, 6}, ss = {"Z", "X"}, a = @Anno1(), color = Colors.WHITE, colors = {Colors.WHITE}, clazz = TestAnno.class, classes = {TestAnno.class, Anno1.class})
|
|
@kotlin.Metadata()
|
|
public final class TestAnno2 {
|
|
@Anno3(value = "field")
|
|
@org.jetbrains.annotations.NotNull()
|
|
private java.lang.String b = "property initializer";
|
|
|
|
public TestAnno2() {
|
|
super();
|
|
}
|
|
|
|
@Anno1()
|
|
public final void a(@Anno3(value = "param-pam-pam")
|
|
@org.jetbrains.annotations.NotNull()
|
|
java.lang.String param) {
|
|
}
|
|
|
|
@Anno3(value = "getter")
|
|
@org.jetbrains.annotations.NotNull()
|
|
public final java.lang.String getB() {
|
|
return null;
|
|
}
|
|
|
|
@Anno3(value = "property")
|
|
@java.lang.Deprecated()
|
|
public static void getB$annotations() {
|
|
}
|
|
|
|
@Anno3(value = "setter")
|
|
public final void setB(@Anno3(value = "setparam")
|
|
@org.jetbrains.annotations.NotNull()
|
|
java.lang.String p0) {
|
|
}
|
|
}
|