[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:
@@ -154,6 +154,7 @@ FILE fqName:<root> fileName:/ImplicitReceiverStack.kt
|
||||
FUN name:iterator visibility:public modality:FINAL <> ($this:<root>.PersistentImplicitReceiverStack) returnType:kotlin.collections.Iterator<<root>.ImplicitReceiverValue<*>> [operator]
|
||||
overridden:
|
||||
public abstract fun iterator (): kotlin.collections.Iterator<<root>.ImplicitReceiverValue<*>> [fake_override,operator] declared in <root>.ImplicitReceiverStack
|
||||
public abstract fun iterator (): kotlin.collections.Iterator<T of kotlin.collections.Iterable> [operator] declared in kotlin.collections.Iterable
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.PersistentImplicitReceiverStack
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun iterator (): kotlin.collections.Iterator<<root>.ImplicitReceiverValue<*>> [operator] declared in <root>.PersistentImplicitReceiverStack'
|
||||
|
||||
Reference in New Issue
Block a user