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
114 lines
2.5 KiB
Plaintext
Vendored
114 lines
2.5 KiB
Plaintext
Vendored
package test;
|
|
|
|
@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();
|
|
}
|
|
|
|
////////////////////
|
|
|
|
package test;
|
|
|
|
@kotlin.Metadata()
|
|
@kotlin.jvm.JvmName(name = "AnnotationsTest")
|
|
public final class AnnotationsTest {
|
|
|
|
public AnnotationsTest() {
|
|
super();
|
|
}
|
|
|
|
@Anno(value = "top-level-fun")
|
|
public static final void topLevelFun(@Anno(value = "top-level-fun-receiver")
|
|
@org.jetbrains.annotations.NotNull()
|
|
java.lang.String $this$topLevelFun) {
|
|
}
|
|
|
|
@Anno(value = "top-level-val")
|
|
@java.lang.Deprecated()
|
|
public static void getTopLevelVal$annotations(int p0) {
|
|
}
|
|
|
|
@org.jetbrains.annotations.NotNull()
|
|
public static final java.lang.String getTopLevelVal(@Anno(value = "top-level-val-receiver")
|
|
int $this$topLevelVal) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
////////////////////
|
|
|
|
package test;
|
|
|
|
@Anno(value = "enum")
|
|
@kotlin.Metadata()
|
|
public enum Enum {
|
|
@Anno(value = "white")
|
|
/*public static final*/ WHITE /* = new Enum() */,
|
|
@Anno(value = "black")
|
|
/*public static final*/ BLACK /* = new Enum() */;
|
|
private final int x = 0;
|
|
|
|
@Anno(value = "enum-constructor")
|
|
Enum(@Anno(value = "x")
|
|
int x) {
|
|
}
|
|
|
|
public final int getX() {
|
|
return 0;
|
|
}
|
|
|
|
public static kotlin.enums.EnumEntries<test.Enum> getEntries() {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
////////////////////
|
|
|
|
package test;
|
|
|
|
@Anno(value = "clazz")
|
|
@kotlin.Metadata()
|
|
public abstract class Test {
|
|
@org.jetbrains.annotations.NotNull()
|
|
private java.lang.String v;
|
|
|
|
@Anno(value = "test-constructor")
|
|
protected Test(@Anno(value = "v-param")
|
|
@org.jetbrains.annotations.NotNull()
|
|
java.lang.String v) {
|
|
super();
|
|
}
|
|
|
|
@Anno(value = "v-get")
|
|
@org.jetbrains.annotations.NotNull()
|
|
public final java.lang.String getV() {
|
|
return null;
|
|
}
|
|
|
|
@Anno(value = "v-property")
|
|
@java.lang.Deprecated()
|
|
public static void getV$annotations() {
|
|
}
|
|
|
|
@Anno(value = "v-set")
|
|
public final void setV(@Anno(value = "v-setparam")
|
|
@org.jetbrains.annotations.NotNull()
|
|
java.lang.String p0) {
|
|
}
|
|
|
|
@Anno(value = "abstract-method")
|
|
@org.jetbrains.annotations.NotNull()
|
|
public abstract java.lang.String abstractMethod();
|
|
|
|
@org.jetbrains.annotations.NotNull()
|
|
public abstract java.lang.String getAbstractVal();
|
|
|
|
@Anno(value = "abstract-val")
|
|
@java.lang.Deprecated()
|
|
public static void getAbstractVal$annotations() {
|
|
}
|
|
}
|