[FIR] Fix disappeared REPEATED_ANNOTATION for dynamic types

https://youtrack.jetbrains.com/issue/KT-59916/K2-Disappeared-REPEATEDANNOTATION
FirAnnotationChecker does not detect repeated annotation on dynamic type, since FirTypeResolverImpl wrongly did not convert source annotations to attributes of ConeDynamicType.
This MR improves FirTypeResolverImpl to convert attributes of FirDynamicTypeRef to annotations and attach them to ConeDynamicType.

Merge-request: KT-MR-12551
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
This commit is contained in:
Vladimir Sukharev
2023-10-17 10:18:36 +00:00
committed by Space Team
parent 22a01432df
commit 242c1cf5f0
12 changed files with 75 additions and 8 deletions
@@ -2136,6 +2136,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/annotations/typeParameterAsAnnotation.kt");
}
@Test
@TestMetadata("typealiasWithAnnotatedAbstractClass.kt")
public void testTypealiasWithAnnotatedAbstractClass() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/typealiasWithAnnotatedAbstractClass.kt");
}
@Test
@TestMetadata("UnresolvedAnnotationOnObject.kt")
public void testUnresolvedAnnotationOnObject() throws Exception {
@@ -2136,6 +2136,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/annotations/typeParameterAsAnnotation.kt");
}
@Test
@TestMetadata("typealiasWithAnnotatedAbstractClass.kt")
public void testTypealiasWithAnnotatedAbstractClass() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/typealiasWithAnnotatedAbstractClass.kt");
}
@Test
@TestMetadata("UnresolvedAnnotationOnObject.kt")
public void testUnresolvedAnnotationOnObject() throws Exception {