diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/enumConstructorCallWithErrorType.ir.txt b/plugins/kapt3/kapt3-compiler/testData/converter/enumConstructorCallWithErrorType.ir.txt new file mode 100644 index 00000000000..9b097be6b30 --- /dev/null +++ b/plugins/kapt3/kapt3-compiler/testData/converter/enumConstructorCallWithErrorType.ir.txt @@ -0,0 +1,57 @@ +/** + * public final enum class E : kotlin/Enum { + * + * // signature: (Ljava/lang/String;ILI;)V + * private constructor(i: I) + * + * // field: i:LI; + * // getter: getI()LI; + * public final val i: I + * public final get + * + * E1, + * + * E2, + * + * E3, + * + * // module name: main + * + * // has Enum.entries + * } + */ +@kotlin.Metadata() +@kotlin.Suppress(names = {"UNRESOLVED_REFERENCE"}) +public enum E { + /*public static final*/ E1 /* = new E() */, + /*public static final*/ E2 /* = new E() */, + /*public static final*/ E3 /* = new E() */; + @org.jetbrains.annotations.NotNull() + private final I i = null; + + E(I i) { + } + + @org.jetbrains.annotations.NotNull() + public final I getI() { + return null; + } + + @org.jetbrains.annotations.NotNull() + public static kotlin.enums.EnumEntries getEntries() { + return null; + } +} + +//////////////////// + + +/** + * public abstract interface I : kotlin/Any { + * + * // module name: main + * } + */ +@kotlin.Metadata() +public abstract interface I { +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/enumConstructorCallWithErrorType.kt b/plugins/kapt3/kapt3-compiler/testData/converter/enumConstructorCallWithErrorType.kt new file mode 100644 index 00000000000..20f752c54a0 --- /dev/null +++ b/plugins/kapt3/kapt3-compiler/testData/converter/enumConstructorCallWithErrorType.kt @@ -0,0 +1,10 @@ +// CORRECT_ERROR_TYPES + +interface I + +@Suppress("UNRESOLVED_REFERENCE") +enum class E(val i: I) { + E1(Unresolved1), + E2(Unresolved2), + E3(Unresolved3), +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/enumConstructorCallWithErrorType.txt b/plugins/kapt3/kapt3-compiler/testData/converter/enumConstructorCallWithErrorType.txt new file mode 100644 index 00000000000..0ca9b1037bd --- /dev/null +++ b/plugins/kapt3/kapt3-compiler/testData/converter/enumConstructorCallWithErrorType.txt @@ -0,0 +1,52 @@ +/** + * public final enum class E : kotlin/Enum { + * + * // signature: (Ljava/lang/String;ILI;)V + * private constructor(i: I) + * + * // field: i:LI; + * // getter: getI()LI; + * public final val i: I + * public final get + * + * E1, + * + * E2, + * + * E3, + * + * // module name: main + * + * // has Enum.entries + * } + */ +@kotlin.Metadata() +@kotlin.Suppress(names = {"UNRESOLVED_REFERENCE"}) +public enum E { + /*public static final*/ E1 /* = new E() */, + /*public static final*/ E2 /* = new E() */, + /*public static final*/ E3 /* = new E() */; + @org.jetbrains.annotations.NotNull() + private final I i = null; + + E(I i) { + } + + @org.jetbrains.annotations.NotNull() + public final I getI() { + return null; + } +} + +//////////////////// + + +/** + * public abstract interface I : kotlin/Any { + * + * // module name: main + * } + */ +@kotlin.Metadata() +public abstract interface I { +} diff --git a/plugins/kapt3/kapt3-compiler/tests-gen/org/jetbrains/kotlin/kapt3/test/runners/ClassFileToSourceStubConverterTestGenerated.java b/plugins/kapt3/kapt3-compiler/tests-gen/org/jetbrains/kotlin/kapt3/test/runners/ClassFileToSourceStubConverterTestGenerated.java index f78fbdf4d2c..6591c50bac6 100644 --- a/plugins/kapt3/kapt3-compiler/tests-gen/org/jetbrains/kotlin/kapt3/test/runners/ClassFileToSourceStubConverterTestGenerated.java +++ b/plugins/kapt3/kapt3-compiler/tests-gen/org/jetbrains/kotlin/kapt3/test/runners/ClassFileToSourceStubConverterTestGenerated.java @@ -193,6 +193,12 @@ public class ClassFileToSourceStubConverterTestGenerated extends AbstractClassFi runTest("plugins/kapt3/kapt3-compiler/testData/converter/deprecated.kt"); } + @Test + @TestMetadata("enumConstructorCallWithErrorType.kt") + public void testEnumConstructorCallWithErrorType() throws Exception { + runTest("plugins/kapt3/kapt3-compiler/testData/converter/enumConstructorCallWithErrorType.kt"); + } + @Test @TestMetadata("enumImports.kt") public void testEnumImports() throws Exception { diff --git a/plugins/kapt3/kapt3-compiler/tests-gen/org/jetbrains/kotlin/kapt3/test/runners/IrClassFileToSourceStubConverterTestGenerated.java b/plugins/kapt3/kapt3-compiler/tests-gen/org/jetbrains/kotlin/kapt3/test/runners/IrClassFileToSourceStubConverterTestGenerated.java index 9753621304c..f06a6a406ac 100644 --- a/plugins/kapt3/kapt3-compiler/tests-gen/org/jetbrains/kotlin/kapt3/test/runners/IrClassFileToSourceStubConverterTestGenerated.java +++ b/plugins/kapt3/kapt3-compiler/tests-gen/org/jetbrains/kotlin/kapt3/test/runners/IrClassFileToSourceStubConverterTestGenerated.java @@ -193,6 +193,12 @@ public class IrClassFileToSourceStubConverterTestGenerated extends AbstractIrCla runTest("plugins/kapt3/kapt3-compiler/testData/converter/deprecated.kt"); } + @Test + @TestMetadata("enumConstructorCallWithErrorType.kt") + public void testEnumConstructorCallWithErrorType() throws Exception { + runTest("plugins/kapt3/kapt3-compiler/testData/converter/enumConstructorCallWithErrorType.kt"); + } + @Test @TestMetadata("enumImports.kt") public void testEnumImports() throws Exception { diff --git a/plugins/kapt4/tests-gen/org/jetbrains/kotlin/kapt4/KotlinKapt4ContextTestGenerated.java b/plugins/kapt4/tests-gen/org/jetbrains/kotlin/kapt4/KotlinKapt4ContextTestGenerated.java index 0d605a8bac0..83a30573285 100644 --- a/plugins/kapt4/tests-gen/org/jetbrains/kotlin/kapt4/KotlinKapt4ContextTestGenerated.java +++ b/plugins/kapt4/tests-gen/org/jetbrains/kotlin/kapt4/KotlinKapt4ContextTestGenerated.java @@ -193,6 +193,12 @@ public class KotlinKapt4ContextTestGenerated extends AbstractKotlinKapt4ContextT runTest("plugins/kapt4/../kapt3/kapt3-compiler/testData/converter/deprecated.kt"); } + @Test + @TestMetadata("enumConstructorCallWithErrorType.kt") + public void testEnumConstructorCallWithErrorType() throws Exception { + runTest("plugins/kapt4/../kapt3/kapt3-compiler/testData/converter/enumConstructorCallWithErrorType.kt"); + } + @Test @TestMetadata("enumImports.kt") public void testEnumImports() throws Exception {