diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/AnnotationChecker.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/AnnotationChecker.kt index fad5da5da2b..e1bc8ebc911 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/AnnotationChecker.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/AnnotationChecker.kt @@ -46,6 +46,9 @@ class AnnotationChecker(private val additionalCheckers: Iterable@A Int diff --git a/compiler/testData/diagnostics/tests/typealias/typealiasRhsRepeatedAnnotations.txt b/compiler/testData/diagnostics/tests/typealias/typealiasRhsRepeatedAnnotations.txt new file mode 100644 index 00000000000..dba3c4edf50 --- /dev/null +++ b/compiler/testData/diagnostics/tests/typealias/typealiasRhsRepeatedAnnotations.txt @@ -0,0 +1,9 @@ +package + +@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.TYPE}) public final annotation class A : kotlin.Annotation { + public constructor A() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} +public typealias Test1 = @A @A kotlin.Int diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java index e38c9e05b1c..af11f800f4c 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java @@ -20910,6 +20910,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { doTest(fileName); } + @TestMetadata("typealiasRhsRepeatedAnnotations.kt") + public void testTypealiasRhsRepeatedAnnotations() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typealiasRhsRepeatedAnnotations.kt"); + doTest(fileName); + } + @TestMetadata("unsupportedTypeAlias.kt") public void testUnsupportedTypeAlias() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.kt");