c80cfb0fdb
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)
34 lines
961 B
Plaintext
Vendored
34 lines
961 B
Plaintext
Vendored
FILE: noIntersectionOverrideOfTwoMembers_java.kt
|
|
public abstract interface A : R|kotlin/Any| {
|
|
public abstract fun foo(): R|kotlin/Any|
|
|
|
|
public abstract val x: R|kotlin/Any|
|
|
public get(): R|kotlin/Any|
|
|
|
|
}
|
|
public abstract interface B : R|A| {
|
|
public abstract override fun foo(): R|kotlin/Any|
|
|
|
|
public abstract override val x: R|kotlin/Any|
|
|
public get(): R|kotlin/Any|
|
|
|
|
}
|
|
public abstract interface C : R|A|, R|B| {
|
|
}
|
|
public abstract interface D : R|kotlin/Any| {
|
|
public abstract fun foo(): R|kotlin/Int|
|
|
|
|
public abstract val x: R|kotlin/Any|
|
|
public get(): R|kotlin/Any|
|
|
|
|
}
|
|
public abstract interface Explicit : R|C|, R|D| {
|
|
public abstract override fun foo(): R|kotlin/Int|
|
|
|
|
public abstract override val x: R|kotlin/Any|
|
|
public get(): R|kotlin/Any|
|
|
|
|
}
|
|
public abstract interface Implicit : R|C|, R|D| {
|
|
}
|