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
725 B
Plaintext
Vendored
25 lines
725 B
Plaintext
Vendored
FILE: A.kt
|
|
public open class A : R|kotlin/Any| {
|
|
public constructor(): R|A| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
public open fun getScope(): R|kotlin/String?| {
|
|
^getScope Null(null)
|
|
}
|
|
|
|
public final fun setScope(scope: R|kotlin/String?|): R|A| {
|
|
^setScope this@R|/A|
|
|
}
|
|
|
|
protected final var scope: R|kotlin/String?| = Null(null)
|
|
protected get(): R|kotlin/String?|
|
|
protected set(value: R|kotlin/String?|): R|kotlin/Unit|
|
|
|
|
}
|
|
FILE: main.kt
|
|
public final fun test(b: R|B|): R|kotlin/Unit| {
|
|
lval s: R|kotlin/String?| = R|<local>/b|.R|/B.getScope|()
|
|
R|<local>/b|.R|/A.setScope|(R|<local>/s|)
|
|
}
|