[FIR2IR] Always look for already generated fake overrides before creating them

This change covers the case where some f/o was generated in common module
  and it is referenced in platform code. But signature of this f/o may be
  different in different modules because of e.g. actualization of value
  parameters with actual typealias

^KT-60850 Fixed
This commit is contained in:
Dmitriy Novozhilov
2023-08-02 16:58:39 +03:00
committed by Space Team
parent 380062c511
commit 4e3dbcada3
22 changed files with 590 additions and 37 deletions
@@ -13519,6 +13519,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
runTest("compiler/testData/codegen/box/fakeOverride/internalFromFriendModule.kt");
}
@Test
@TestMetadata("intersectionInLocal.kt")
public void testIntersectionInLocal() throws Exception {
runTest("compiler/testData/codegen/box/fakeOverride/intersectionInLocal.kt");
}
@Test
@TestMetadata("kt49371.kt")
public void testKt49371() throws Exception {
@@ -13549,6 +13555,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
runTest("compiler/testData/codegen/box/fakeOverride/propertySetter.kt");
}
@Test
@TestMetadata("substitutionInLocal.kt")
public void testSubstitutionInLocal() throws Exception {
runTest("compiler/testData/codegen/box/fakeOverride/substitutionInLocal.kt");
}
@Test
@TestMetadata("varianceOverload.kt")
public void testVarianceOverload() throws Exception {
@@ -23435,6 +23447,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt");
}
@Test
@TestMetadata("intersectionOverrideWithDefaultParameterInCommonModule.kt")
public void testIntersectionOverrideWithDefaultParameterInCommonModule() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideWithDefaultParameterInCommonModule.kt");
}
@Test
@TestMetadata("kt-56329.kt")
public void testKt_56329() throws Exception {
@@ -23447,6 +23465,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt");
}
@Test
@TestMetadata("localIntersectionOverrideWithDefaultParameterInCommonModule.kt")
public void testLocalIntersectionOverrideWithDefaultParameterInCommonModule() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideWithDefaultParameterInCommonModule.kt");
}
@Test
@TestMetadata("localSubstitutionOverrideInCommonModule.kt")
public void testLocalSubstitutionOverrideInCommonModule() throws Exception {
@@ -13519,6 +13519,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
runTest("compiler/testData/codegen/box/fakeOverride/internalFromFriendModule.kt");
}
@Test
@TestMetadata("intersectionInLocal.kt")
public void testIntersectionInLocal() throws Exception {
runTest("compiler/testData/codegen/box/fakeOverride/intersectionInLocal.kt");
}
@Test
@TestMetadata("kt49371.kt")
public void testKt49371() throws Exception {
@@ -13549,6 +13555,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
runTest("compiler/testData/codegen/box/fakeOverride/propertySetter.kt");
}
@Test
@TestMetadata("substitutionInLocal.kt")
public void testSubstitutionInLocal() throws Exception {
runTest("compiler/testData/codegen/box/fakeOverride/substitutionInLocal.kt");
}
@Test
@TestMetadata("varianceOverload.kt")
public void testVarianceOverload() throws Exception {
@@ -23435,6 +23447,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt");
}
@Test
@TestMetadata("intersectionOverrideWithDefaultParameterInCommonModule.kt")
public void testIntersectionOverrideWithDefaultParameterInCommonModule() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideWithDefaultParameterInCommonModule.kt");
}
@Test
@TestMetadata("kt-56329.kt")
public void testKt_56329() throws Exception {
@@ -23447,6 +23465,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt");
}
@Test
@TestMetadata("localIntersectionOverrideWithDefaultParameterInCommonModule.kt")
public void testLocalIntersectionOverrideWithDefaultParameterInCommonModule() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideWithDefaultParameterInCommonModule.kt");
}
@Test
@TestMetadata("localSubstitutionOverrideInCommonModule.kt")
public void testLocalSubstitutionOverrideInCommonModule() throws Exception {