[FIR] Don't remove subsumed members from intersection overrides's overriddens

This fixes a bunch of missing overridden symbols in IR.
This is also required for fixing KT-59921 in the following commit
where we need to keep all overridden symbols of intersection overrides
so that we can enhance them properly.

#KT-57300 Fixed
#KT-57299 Fixed
#KT-59921
#KT-57300
#KT-62788
#KT-64271
#KT-64382
This commit is contained in:
Kirill Rakhman
2024-01-17 09:59:17 +01:00
committed by Space Team
parent d80dee6e1c
commit 3b841dcb98
58 changed files with 899 additions and 530 deletions
@@ -83,14 +83,17 @@ FILE fqName:<root> fileName:/delegatedPropertyWithMultipleOverriddens_generics.k
FUN FAKE_OVERRIDE name:foo visibility:public modality:ABSTRACT <> ($this:<root>.MyList<E4 of <root>.MyMutableList>) returnType:E4 of <root>.MyMutableList [fake_override]
overridden:
public abstract fun foo (): E2 of <root>.MyList declared in <root>.MyList
public abstract fun foo (): E3 of <root>.MyMutableCollection declared in <root>.MyMutableCollection
$this: VALUE_PARAMETER name:<this> type:<root>.MyList<E4 of <root>.MyMutableList>
PROPERTY FAKE_OVERRIDE name:bar visibility:public modality:ABSTRACT [fake_override,val]
overridden:
public abstract bar: E2 of <root>.MyList
public abstract bar: E3 of <root>.MyMutableCollection
FUN FAKE_OVERRIDE name:<get-bar> visibility:public modality:ABSTRACT <> ($this:<root>.MyList<E4 of <root>.MyMutableList>) returnType:E4 of <root>.MyMutableList [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:bar visibility:public modality:ABSTRACT [fake_override,val]
overridden:
public abstract fun <get-bar> (): E2 of <root>.MyList declared in <root>.MyList
public abstract fun <get-bar> (): E3 of <root>.MyMutableCollection declared in <root>.MyMutableCollection
$this: VALUE_PARAMETER name:<this> type:<root>.MyList<E4 of <root>.MyMutableList>
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
@@ -1,7 +1,5 @@
// ISSUE: KT-55828
// DUMP_IR
// IGNORE_CODEGEN_WITH_IR_FAKE_OVERRIDE_GENERATION: extra overridden symbols for declarations in MyMutableList.
// ^ This is most likely not a problem, and IR dump can be changed once IR fake override generation is enabled by default.
// JVM_ABI_K1_K2_DIFF: KT-63828
@@ -79,14 +79,17 @@ FILE fqName:<root> fileName:/delegatedPropertyWithMultipleOverriddens_noGenerics
FUN FAKE_OVERRIDE name:foo visibility:public modality:ABSTRACT <> ($this:<root>.MyList) returnType:kotlin.String [fake_override]
overridden:
public abstract fun foo (): kotlin.String declared in <root>.MyList
public abstract fun foo (): kotlin.String declared in <root>.MyMutableCollection
$this: VALUE_PARAMETER name:<this> type:<root>.MyList
PROPERTY FAKE_OVERRIDE name:bar visibility:public modality:ABSTRACT [fake_override,val]
overridden:
public abstract bar: kotlin.String
public abstract bar: kotlin.String
FUN FAKE_OVERRIDE name:<get-bar> visibility:public modality:ABSTRACT <> ($this:<root>.MyList) returnType:kotlin.String [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:bar visibility:public modality:ABSTRACT [fake_override,val]
overridden:
public abstract fun <get-bar> (): kotlin.String declared in <root>.MyList
public abstract fun <get-bar> (): kotlin.String declared in <root>.MyMutableCollection
$this: VALUE_PARAMETER name:<this> type:<root>.MyList
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
@@ -1,7 +1,5 @@
// ISSUE: KT-55828
// DUMP_IR
// IGNORE_CODEGEN_WITH_IR_FAKE_OVERRIDE_GENERATION: extra overridden symbols for declarations in MyMutableList.
// ^ This is most likely not a problem, and IR dump can be changed once IR fake override generation is enabled by default.
// JVM_ABI_K1_K2_DIFF: KT-63828
interface MyCollection {