[FIR] Allow declarations to override parts of non-trivial intersection
A class can inherit two declarations that are compatible from the overridability standpoint and are therefore combined to a non-trivial intersection. At the same time, the class can declare a member declaration that only overrides one of the intersection's members. In this case, we break up the intersection and only add the overridden parts to the declared member's direct overridden list. If the class doesn't override the intersection, it exists as intersection override, like before. #KT-65487 Fixed
This commit is contained in:
committed by
Space Team
parent
889182629e
commit
26fae9e83a
Generated
+6
@@ -22721,6 +22721,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/getCharSequence.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intersectionWithMappedSignature.kt")
|
||||
public void testIntersectionWithMappedSignature() {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/intersectionWithMappedSignature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("irrelevantCharAtAbstract.kt")
|
||||
public void testIrrelevantCharAtAbstract() {
|
||||
|
||||
+12
@@ -30819,6 +30819,12 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency
|
||||
runTest("compiler/testData/codegen/box/javaInterop/genericSamSmartcast.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("immutableName.kt")
|
||||
public void testImmutableName() {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/immutableName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritanceWithWildcard.kt")
|
||||
public void testInheritanceWithWildcard() {
|
||||
@@ -51309,6 +51315,12 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency
|
||||
runTest("compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intersectionWithMappedSignature.kt")
|
||||
public void testIntersectionWithMappedSignature() {
|
||||
runTest("compiler/testData/codegen/box/specialBuiltins/intersectionWithMappedSignature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("irrelevantRemoveAndJavaList.kt")
|
||||
public void testIrrelevantRemoveAndJavaList() {
|
||||
|
||||
+6
@@ -29013,6 +29013,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/genericSamSmartcast.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("immutableName.kt")
|
||||
public void testImmutableName() {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/immutableName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritanceWithWildcard.kt")
|
||||
public void testInheritanceWithWildcard() {
|
||||
|
||||
+12
@@ -30819,6 +30819,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/javaInterop/genericSamSmartcast.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("immutableName.kt")
|
||||
public void testImmutableName() {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/immutableName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritanceWithWildcard.kt")
|
||||
public void testInheritanceWithWildcard() {
|
||||
@@ -51361,6 +51367,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intersectionWithMappedSignature.kt")
|
||||
public void testIntersectionWithMappedSignature() {
|
||||
runTest("compiler/testData/codegen/box/specialBuiltins/intersectionWithMappedSignature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("irrelevantRemoveAndJavaList.kt")
|
||||
public void testIrrelevantRemoveAndJavaList() {
|
||||
|
||||
+12
@@ -30819,6 +30819,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
|
||||
runTest("compiler/testData/codegen/box/javaInterop/genericSamSmartcast.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("immutableName.kt")
|
||||
public void testImmutableName() {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/immutableName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritanceWithWildcard.kt")
|
||||
public void testInheritanceWithWildcard() {
|
||||
@@ -51361,6 +51367,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
|
||||
runTest("compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intersectionWithMappedSignature.kt")
|
||||
public void testIntersectionWithMappedSignature() {
|
||||
runTest("compiler/testData/codegen/box/specialBuiltins/intersectionWithMappedSignature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("irrelevantRemoveAndJavaList.kt")
|
||||
public void testIrrelevantRemoveAndJavaList() {
|
||||
|
||||
+6
@@ -2703,6 +2703,12 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest
|
||||
public void testFakeOverrideOfRawJavaCollection() {
|
||||
runTest("compiler/testData/ir/irText/fakeOverrides/fakeOverrideOfRawJavaCollection.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intersectionWithMappedSignature.kt")
|
||||
public void testIntersectionWithMappedSignature() {
|
||||
runTest("compiler/testData/ir/irText/fakeOverrides/intersectionWithMappedSignature.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
Reference in New Issue
Block a user