[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
@@ -14655,6 +14655,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
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 {
@@ -14685,6 +14691,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
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 {
@@ -26662,6 +26674,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
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 {
@@ -26674,6 +26692,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
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 {
@@ -15007,6 +15007,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
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 {
@@ -15037,6 +15043,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
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 {
@@ -27278,6 +27290,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
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 {
@@ -27290,6 +27308,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
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 {
@@ -14480,6 +14480,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
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 {
@@ -14510,6 +14516,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
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 {
@@ -26355,6 +26367,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
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 {
@@ -26367,6 +26385,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
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 {
@@ -14656,6 +14656,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
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 {
@@ -14686,6 +14692,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
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 {
@@ -26663,6 +26675,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
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 {
@@ -26675,6 +26693,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
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 {