Files
kotlin-fork/plugins/kapt3/kapt3-compiler/testData/converter/comments.ir.txt
T
Alexander Udalov 1844869e8a Kapt+JVM_IR: fix ordering of properties in generated stubs
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
2023-02-06 21:34:10 +00:00

188 lines
3.1 KiB
Plaintext
Vendored

@kotlin.annotation.Target(allowedTargets = {kotlin.annotation.AnnotationTarget.PROPERTY})
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
@java.lang.annotation.Target(value = {})
@kotlin.Metadata()
public abstract @interface Anno {
}
////////////////////
@kotlin.Metadata()
public enum EnumError {
/*public static final*/ One /* = new EnumError() */,
/*public static final*/ Two /* = new EnumError() */;
EnumError() {
}
@org.jetbrains.annotations.NotNull()
public abstract java.lang.String doIt();
public static kotlin.enums.EnumEntries<EnumError> getEntries() {
return null;
}
}
////////////////////
/**
* Obj.
*/
@kotlin.Metadata()
public final class Obj {
@org.jetbrains.annotations.NotNull()
public static final Obj INSTANCE = null;
private Obj() {
super();
}
}
////////////////////
/**
* Test.
*/
@kotlin.Metadata()
public final class Test {
/**
* prop.
*/
@org.jetbrains.annotations.NotNull()
public final java.lang.String prop = "";
/**
* prop2.
*/
@org.jetbrains.annotations.NotNull()
private final java.lang.String prop2 = "";
public Test() {
super();
}
/**
* method().
*/
public final void method() {
}
/**
* method(int).
*/
public final void method(int a) {
}
/**
* method(String).
*/
public final void method(@org.jetbrains.annotations.NotNull()
java.lang.String a) {
}
/**
* prop2.
*/
@org.jetbrains.annotations.NotNull()
public final java.lang.String getProp2() {
return null;
}
/**
* prop2.
*/
@Anno()
@java.lang.Deprecated()
public static void getProp2$annotations() {
}
/**
* get.
*/
@org.jetbrains.annotations.NotNull()
public final java.lang.String getProp3() {
return null;
}
/**
* set.
*/
public final void setProp3(@org.jetbrains.annotations.NotNull()
java.lang.String v) {
}
}
////////////////////
/**
* Test2
* Multiline
* documentation.
*/
@kotlin.Metadata()
public final class Test2 {
@org.jetbrains.annotations.NotNull()
private final java.lang.String a = null;
public Test2(@org.jetbrains.annotations.NotNull()
java.lang.String a) {
super();
}
@org.jetbrains.annotations.NotNull()
public final java.lang.String getA() {
return null;
}
}
////////////////////
/**
* constructor.
*/
@kotlin.Metadata()
public final class Test3 {
@org.jetbrains.annotations.NotNull()
private final java.lang.String a = null;
protected Test3(@org.jetbrains.annotations.NotNull()
java.lang.String a) {
super();
}
@org.jetbrains.annotations.NotNull()
public final java.lang.String getA() {
return null;
}
}
////////////////////
@kotlin.Metadata()
public final class Test4 {
public Test4() {
super();
}
public final void method() {
}
}
////////////////////
/**
* `/ * Failure * /`
*/
@kotlin.Metadata()
public abstract interface TestComponent {
}