[FIR2IR] Properly calculate dispatch receiver type for fake overrides

If some function is not fake-override, then its type should be just
  default type of containing class
For fake overrides the default type calculated in the following way:
1. Find first overridden function, which is not fake override
2. Take its containing class
3. Find supertype of current containing class with type constructor of
   class from step 2

^KT-60252 Fixed
This commit is contained in:
Dmitriy Novozhilov
2023-08-24 14:40:29 +03:00
committed by Space Team
parent e28f97cf6d
commit d4f55894b4
75 changed files with 1866 additions and 2794 deletions
@@ -137,6 +137,11 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase {
runTest("compiler/testData/ir/irText/classes/enumWithSecondaryCtor.kt");
}
@TestMetadata("fakeOverridesForAnyMembers.kt")
public void testFakeOverridesForAnyMembers() throws Exception {
runTest("compiler/testData/ir/irText/classes/fakeOverridesForAnyMembers.kt");
}
@TestMetadata("initBlock.kt")
public void testInitBlock() throws Exception {
runTest("compiler/testData/ir/irText/classes/initBlock.kt");