FIR2IR: Fix IAE for case of local override of a method with defaults

It was happening because for MyClass.foo we didn't set overriddenSymbols
properly because in ClassMemberGenerator.convertFunctionContent we
used incorrect containingFirClass that was pointing to anonymous class
instead of MyClass.

^KT-58902 Fixed
This commit is contained in:
Denis.Zharkov
2023-06-07 13:54:40 +02:00
committed by Space Team
parent b04848d179
commit c474c54903
21 changed files with 422 additions and 2 deletions
@@ -14608,6 +14608,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("anonymousOverrideWithDefaultInLocalOverridden.kt")
public void testAnonymousOverrideWithDefaultInLocalOverridden() throws Exception {
runTest("compiler/testData/codegen/box/fir/anonymousOverrideWithDefaultInLocalOverridden.kt");
}
@TestMetadata("anonymousOverrideWithDefaultInOverridden.kt")
public void testAnonymousOverrideWithDefaultInOverridden() throws Exception {
runTest("compiler/testData/codegen/box/fir/anonymousOverrideWithDefaultInOverridden.kt");
}
@TestMetadata("ClassBuilder.kt")
public void testClassBuilder() throws Exception {
runTest("compiler/testData/codegen/box/fir/ClassBuilder.kt");
@@ -14668,6 +14678,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/fir/KotlinDocumentationProvider.kt");
}
@TestMetadata("localOverrideWithDefaultInLocalOverridden.kt")
public void testLocalOverrideWithDefaultInLocalOverridden() throws Exception {
runTest("compiler/testData/codegen/box/fir/localOverrideWithDefaultInLocalOverridden.kt");
}
@TestMetadata("localOverrideWithDefaultInOverridden.kt")
public void testLocalOverrideWithDefaultInOverridden() throws Exception {
runTest("compiler/testData/codegen/box/fir/localOverrideWithDefaultInOverridden.kt");
}
@TestMetadata("LookupTags.kt")
public void testLookupTags() throws Exception {
runTest("compiler/testData/codegen/box/fir/LookupTags.kt");