IR: check type parameter bounds equality in overrides

The code is exactly the same as in K1's
`OverridingUtil.areTypeParametersEquivalent`.

 #KT-63442 Fixed
This commit is contained in:
Alexander Udalov
2023-11-24 13:12:04 +01:00
committed by Space Team
parent 560c1cacf3
commit fc7de5ab97
25 changed files with 816 additions and 22 deletions
@@ -15703,6 +15703,24 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt");
}
@Test
@TestMetadata("functionsDifferInTypeParameterBounds.kt")
public void testFunctionsDifferInTypeParameterBounds() throws Exception {
runTest("compiler/testData/codegen/box/fir/functionsDifferInTypeParameterBounds.kt");
}
@Test
@TestMetadata("functionsDifferInTypeParameterBounds2.kt")
public void testFunctionsDifferInTypeParameterBounds2() throws Exception {
runTest("compiler/testData/codegen/box/fir/functionsDifferInTypeParameterBounds2.kt");
}
@Test
@TestMetadata("functionsDifferInTypeParameterBounds3.kt")
public void testFunctionsDifferInTypeParameterBounds3() throws Exception {
runTest("compiler/testData/codegen/box/fir/functionsDifferInTypeParameterBounds3.kt");
}
@Test
@TestMetadata("listAssignmentInWhen.kt")
public void testListAssignmentInWhen() throws Exception {
@@ -16075,6 +16075,24 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt");
}
@Test
@TestMetadata("functionsDifferInTypeParameterBounds.kt")
public void testFunctionsDifferInTypeParameterBounds() throws Exception {
runTest("compiler/testData/codegen/box/fir/functionsDifferInTypeParameterBounds.kt");
}
@Test
@TestMetadata("functionsDifferInTypeParameterBounds2.kt")
public void testFunctionsDifferInTypeParameterBounds2() throws Exception {
runTest("compiler/testData/codegen/box/fir/functionsDifferInTypeParameterBounds2.kt");
}
@Test
@TestMetadata("functionsDifferInTypeParameterBounds3.kt")
public void testFunctionsDifferInTypeParameterBounds3() throws Exception {
runTest("compiler/testData/codegen/box/fir/functionsDifferInTypeParameterBounds3.kt");
}
@Test
@TestMetadata("listAssignmentInWhen.kt")
public void testListAssignmentInWhen() throws Exception {
@@ -15331,6 +15331,24 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt");
}
@Test
@TestMetadata("functionsDifferInTypeParameterBounds.kt")
public void testFunctionsDifferInTypeParameterBounds() throws Exception {
runTest("compiler/testData/codegen/box/fir/functionsDifferInTypeParameterBounds.kt");
}
@Test
@TestMetadata("functionsDifferInTypeParameterBounds2.kt")
public void testFunctionsDifferInTypeParameterBounds2() throws Exception {
runTest("compiler/testData/codegen/box/fir/functionsDifferInTypeParameterBounds2.kt");
}
@Test
@TestMetadata("functionsDifferInTypeParameterBounds3.kt")
public void testFunctionsDifferInTypeParameterBounds3() throws Exception {
runTest("compiler/testData/codegen/box/fir/functionsDifferInTypeParameterBounds3.kt");
}
@Test
@TestMetadata("listAssignmentInWhen.kt")
public void testListAssignmentInWhen() throws Exception {
@@ -15704,6 +15704,24 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt");
}
@Test
@TestMetadata("functionsDifferInTypeParameterBounds.kt")
public void testFunctionsDifferInTypeParameterBounds() throws Exception {
runTest("compiler/testData/codegen/box/fir/functionsDifferInTypeParameterBounds.kt");
}
@Test
@TestMetadata("functionsDifferInTypeParameterBounds2.kt")
public void testFunctionsDifferInTypeParameterBounds2() throws Exception {
runTest("compiler/testData/codegen/box/fir/functionsDifferInTypeParameterBounds2.kt");
}
@Test
@TestMetadata("functionsDifferInTypeParameterBounds3.kt")
public void testFunctionsDifferInTypeParameterBounds3() throws Exception {
runTest("compiler/testData/codegen/box/fir/functionsDifferInTypeParameterBounds3.kt");
}
@Test
@TestMetadata("listAssignmentInWhen.kt")
public void testListAssignmentInWhen() throws Exception {