[SLC] [KAPT] KT-61916 Fix generation of annotations in annotation arguments
This commit is contained in:
committed by
Space Team
parent
878452bd2b
commit
cf01d2970f
+61
@@ -0,0 +1,61 @@
|
||||
package a;
|
||||
|
||||
/**
|
||||
* public final annotation class a/A : kotlin/Annotation {
|
||||
*
|
||||
* // signature: <init>()V
|
||||
* public constructor()
|
||||
*
|
||||
* // module name: main
|
||||
* }
|
||||
*/
|
||||
@kotlin.Metadata()
|
||||
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
|
||||
public abstract @interface A {
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
package b;
|
||||
|
||||
/**
|
||||
* public final annotation class b/B : kotlin/Annotation {
|
||||
*
|
||||
* // signature: <init>(La/A;)V
|
||||
* public constructor(value: a/A)
|
||||
*
|
||||
* // getter: value()La/A;
|
||||
* public final val value: a/A
|
||||
* public final get
|
||||
*
|
||||
* // module name: main
|
||||
* }
|
||||
*/
|
||||
@kotlin.Metadata()
|
||||
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
|
||||
public abstract @interface B {
|
||||
|
||||
public abstract a.A value();
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
package b;
|
||||
|
||||
/**
|
||||
* public final class b/C : kotlin/Any {
|
||||
*
|
||||
* // signature: <init>()V
|
||||
* public constructor()
|
||||
*
|
||||
* // module name: main
|
||||
* }
|
||||
*/
|
||||
@kotlin.Metadata()
|
||||
@B(value = @a.A())
|
||||
public final class C {
|
||||
|
||||
public C() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// FILE: a/A.kt
|
||||
|
||||
package a
|
||||
|
||||
annotation class A
|
||||
|
||||
|
||||
// FILE: b/B.kt
|
||||
|
||||
package b
|
||||
|
||||
import a.A
|
||||
|
||||
annotation class B(val value: A)
|
||||
|
||||
@B(A())
|
||||
class C
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package a;
|
||||
|
||||
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
|
||||
/**
|
||||
* public final annotation class a/A : kotlin/Annotation {
|
||||
*
|
||||
* // signature: <init>()V
|
||||
* public constructor()
|
||||
*
|
||||
* // module name: main
|
||||
* }
|
||||
*/
|
||||
@kotlin.Metadata()
|
||||
public abstract @interface A {
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
package b;
|
||||
|
||||
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
|
||||
/**
|
||||
* public final annotation class b/B : kotlin/Annotation {
|
||||
*
|
||||
* // signature: <init>(La/A;)V
|
||||
* public constructor(value: a/A)
|
||||
*
|
||||
* // getter: value()La/A;
|
||||
* public final val value: a/A
|
||||
* public final get
|
||||
*
|
||||
* // module name: main
|
||||
* }
|
||||
*/
|
||||
@kotlin.Metadata()
|
||||
public abstract @interface B {
|
||||
|
||||
public abstract a.A value();
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
package b;
|
||||
|
||||
@B(value = @a.A())
|
||||
/**
|
||||
* public final class b/C : kotlin/Any {
|
||||
*
|
||||
* // signature: <init>()V
|
||||
* public constructor()
|
||||
*
|
||||
* // module name: main
|
||||
* }
|
||||
*/
|
||||
@kotlin.Metadata()
|
||||
public final class C {
|
||||
|
||||
public C() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
+6
@@ -43,6 +43,12 @@ public class ClassFileToSourceStubConverterTestGenerated extends AbstractClassFi
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/kapt3/kapt3-compiler/testData/converter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotationInAnnotationParameters.kt")
|
||||
public void testAnnotationInAnnotationParameters() throws Exception {
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/annotationInAnnotationParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotationWithFqNames.kt")
|
||||
public void testAnnotationWithFqNames() throws Exception {
|
||||
|
||||
+6
@@ -43,6 +43,12 @@ public class IrClassFileToSourceStubConverterTestGenerated extends AbstractIrCla
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/kapt3/kapt3-compiler/testData/converter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotationInAnnotationParameters.kt")
|
||||
public void testAnnotationInAnnotationParameters() throws Exception {
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/annotationInAnnotationParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotationWithFqNames.kt")
|
||||
public void testAnnotationWithFqNames() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user