[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:
Kirill Rakhman
2024-02-15 18:00:48 +01:00
committed by Space Team
parent 889182629e
commit 26fae9e83a
34 changed files with 1399 additions and 42 deletions
@@ -26067,6 +26067,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/javaInterop/genericSamSmartcast.kt");
}
@TestMetadata("immutableName.kt")
public void testImmutableName() {
runTest("compiler/testData/codegen/box/javaInterop/immutableName.kt");
}
@TestMetadata("inheritanceWithWildcard.kt")
public void testInheritanceWithWildcard() {
runTest("compiler/testData/codegen/box/javaInterop/inheritanceWithWildcard.kt");
@@ -41330,6 +41335,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt");
}
@TestMetadata("intersectionWithMappedSignature.kt")
public void testIntersectionWithMappedSignature() {
runTest("compiler/testData/codegen/box/specialBuiltins/intersectionWithMappedSignature.kt");
}
@TestMetadata("irrelevantRemoveAndJavaList.kt")
public void testIrrelevantRemoveAndJavaList() {
runTest("compiler/testData/codegen/box/specialBuiltins/irrelevantRemoveAndJavaList.kt");