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)
25 lines
580 B
Plaintext
Vendored
25 lines
580 B
Plaintext
Vendored
FILE: B.kt
|
|
public abstract class B : R|A| {
|
|
public constructor(): R|B| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
private final val foo: R|kotlin/Int| = Int(1)
|
|
private get(): R|kotlin/Int|
|
|
|
|
public open override fun getFoo(): R|kotlin/String| {
|
|
^getFoo String(foo)
|
|
}
|
|
|
|
}
|
|
FILE: main.kt
|
|
public final class D : R|C| {
|
|
public constructor(): R|D| {
|
|
super<R|C|>()
|
|
}
|
|
|
|
}
|
|
public final fun test(d: R|D|): R|kotlin/Unit| {
|
|
R|<local>/d|.R|/B.foo|.R|kotlin/String.length|
|
|
}
|