[FIR] Properly handle nested annotations on compiler-required annotation phase

There was a case when we visited the same declaration multiple times
  because of forward-referencing and visiting with designation
So because of this there were two changes required:
- remove assertion about visiting the same declaration twice (it's fine
  since we don't actually resolve annotations twice)
- not skipping resolution of class children if annotations on this class
  are already resolved

^KT-61388 Fixed
KT-62854
This commit is contained in:
Dmitriy Novozhilov
2023-10-19 17:10:56 +03:00
committed by Space Team
parent 80257dc58f
commit 0325ffaa01
7 changed files with 118 additions and 4 deletions
@@ -767,6 +767,12 @@ public class DiagnosticCompilerTestFirTestdataTestGenerated extends AbstractDiag
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/annotations"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
}
@Test
@TestMetadata("kindaCompilerRequiredNestedAnnotation.kt")
public void testKindaCompilerRequiredNestedAnnotation() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolve/annotations/kindaCompilerRequiredNestedAnnotation.kt");
}
@Test
@TestMetadata("kt43936.kt")
public void testKt43936() throws Exception {
@@ -767,6 +767,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFirTestDataTestGenerated
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/annotations"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
}
@Test
@TestMetadata("kindaCompilerRequiredNestedAnnotation.kt")
public void testKindaCompilerRequiredNestedAnnotation() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolve/annotations/kindaCompilerRequiredNestedAnnotation.kt");
}
@Test
@TestMetadata("kt43936.kt")
public void testKt43936() throws Exception {