[FIR] Replace single supertype scope with list of scopes of supertypes in use site scopes
This big refactoring is needed to cleanup building of overrides
mappings and prevent creating redundant intersection overrides in
cases when there is no need in them:
```kotlin
interface A {
fun foo()
}
interface B {
fun foo()
}
interface C : A, B {
override fun foo()
}
```
Before this refactoring there was next override tree:
C.foo
intersection override (A.foo, B.foo)
A.foo
B.foo
Also this commit fixes special mapping of overrides in jvm scopes
for declarations which have kotlin builtins in supertypes with
special java mapping rules (collections, for example)
This commit is contained in:
@@ -378,9 +378,9 @@ FILE fqName:<root> fileName:/MultiList.kt
|
||||
public open fun sort (p0: @[FlexibleNullability] java.util.Comparator<in @[FlexibleNullability] E of java.util.ArrayList?>?): kotlin.Unit declared in java.util.ArrayList
|
||||
$this: VALUE_PARAMETER name:<this> type:java.util.ArrayList<E of java.util.ArrayList>
|
||||
VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.Comparator<in @[FlexibleNullability] <root>.Some<T of <root>.SomeList>?>?
|
||||
FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList<E of java.util.ArrayList>, p0:kotlin.Int) returnType:@[EnhancedNullability] <root>.Some<T of <root>.SomeList> [fake_override]
|
||||
FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList<E of java.util.ArrayList>, p0:kotlin.Int) returnType:@[EnhancedNullability] <root>.Some<T of <root>.SomeList> [fake_override,operator]
|
||||
overridden:
|
||||
public open fun removeAt (p0: kotlin.Int): @[EnhancedNullability] E of java.util.ArrayList declared in java.util.ArrayList
|
||||
public open fun removeAt (p0: kotlin.Int): @[EnhancedNullability] E of java.util.ArrayList [operator] declared in java.util.ArrayList
|
||||
$this: VALUE_PARAMETER name:<this> type:java.util.ArrayList<E of java.util.ArrayList>
|
||||
VALUE_PARAMETER name:p0 index:0 type:kotlin.Int
|
||||
CLASS CLASS name:FinalList modality:FINAL visibility:public superTypes:[<root>.SomeList<kotlin.String>]
|
||||
@@ -572,8 +572,8 @@ FILE fqName:<root> fileName:/MultiList.kt
|
||||
public open fun sort (p0: @[FlexibleNullability] java.util.Comparator<in @[FlexibleNullability] <root>.Some<T of <root>.SomeList>?>?): kotlin.Unit [fake_override] declared in <root>.SomeList
|
||||
$this: VALUE_PARAMETER name:<this> type:java.util.ArrayList<E of java.util.ArrayList>
|
||||
VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.Comparator<in @[FlexibleNullability] <root>.Some<kotlin.String>?>?
|
||||
FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList<E of java.util.ArrayList>, p0:kotlin.Int) returnType:@[EnhancedNullability] <root>.Some<kotlin.String> [fake_override]
|
||||
FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList<E of java.util.ArrayList>, p0:kotlin.Int) returnType:@[EnhancedNullability] <root>.Some<kotlin.String> [fake_override,operator]
|
||||
overridden:
|
||||
public open fun removeAt (p0: kotlin.Int): @[EnhancedNullability] <root>.Some<T of <root>.SomeList> [fake_override] declared in <root>.SomeList
|
||||
public open fun removeAt (p0: kotlin.Int): @[EnhancedNullability] <root>.Some<T of <root>.SomeList> [fake_override,operator] declared in <root>.SomeList
|
||||
$this: VALUE_PARAMETER name:<this> type:java.util.ArrayList<E of java.util.ArrayList>
|
||||
VALUE_PARAMETER name:p0 index:0 type:kotlin.Int
|
||||
|
||||
Reference in New Issue
Block a user