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)
24 lines
726 B
Plaintext
Vendored
24 lines
726 B
Plaintext
Vendored
FILE: C.kt
|
|
public open class C : R|B<kotlin/Any?>| {
|
|
public constructor(name: R|kotlin/String|): R|C| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
private final var name: R|kotlin/String| = R|<local>/name|
|
|
private get(): R|kotlin/String|
|
|
private set(value: R|kotlin/String|): R|kotlin/Unit|
|
|
|
|
public open override fun getName(): R|kotlin/String| {
|
|
^getName this@R|/C|.R|/C.name|
|
|
}
|
|
|
|
public open override fun setName(newName: R|kotlin/String|): R|kotlin/Any?| {
|
|
^setName Null(null)
|
|
}
|
|
|
|
}
|
|
FILE: main.kt
|
|
public final fun test(d: R|D|): R|kotlin/Unit| {
|
|
lval name: R|kotlin/String| = R|<local>/d|.R|/C.name|
|
|
}
|