[FIR] Add diagnostic when annotation argument is resolved ambiguously
Annotation arguments that are resolved in COMPILER_REQUIRED_ANNOTATIONS phase are resolved again in ANNOTATION_ARGUMENTS phase. If they resolve to a different symbol, report an error. KT-56177
This commit is contained in:
committed by
Space Team
parent
9dda5e4fcd
commit
2139914061
+6
@@ -35874,6 +35874,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotationTargetResolvedAmbiguously.kt")
|
||||
public void testAnnotationTargetResolvedAmbiguously() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationTargetResolvedAmbiguously.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotationsTargetingLateinitAccessors.kt")
|
||||
public void testAnnotationsTargetingLateinitAccessors() throws Exception {
|
||||
|
||||
+6
@@ -35970,6 +35970,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotationTargetResolvedAmbiguously.kt")
|
||||
public void testAnnotationTargetResolvedAmbiguously() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationTargetResolvedAmbiguously.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotationsTargetingLateinitAccessors.kt")
|
||||
public void testAnnotationsTargetingLateinitAccessors() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user