[FIR2IR] Properly calculate overridden symbols for lazy declarations

This change affects only mode with IR f/o generator

The old way of overridden computation with fir2ir f/o generator relied
  on the fact that fir2ir generator creates IR for all f/o and fills
  its caches. But with IR f/o generator enabled, we don't call fir2ir
  generator, so some caches are missing. And for this mode it's enough
  to acquire the symbol using the original declaration symbol and the
  lookup tag of the corresponding supertype

Relates to KT-64202
This commit is contained in:
Dmitriy Novozhilov
2023-12-06 12:10:48 +02:00
committed by Space Team
parent dcd3f3b155
commit 97cf62e291
17 changed files with 439 additions and 16 deletions
@@ -15901,6 +15901,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fakeOverride"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("complexOverriddensInLazyFunctions.kt")
public void testComplexOverriddensInLazyFunctions() throws Exception {
runTest("compiler/testData/codegen/box/fakeOverride/complexOverriddensInLazyFunctions.kt");
}
@TestMetadata("diamondFunction.kt")
public void testDiamondFunction() throws Exception {
runTest("compiler/testData/codegen/box/fakeOverride/diamondFunction.kt");