Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/scopes/intersectionOverrideOfTwoMembers_java.fir.txt
T
Dmitriy Novozhilov c80cfb0fdb [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)
2022-01-19 15:24:43 +03:00

25 lines
685 B
Plaintext
Vendored

FILE: intersectionOverrideOfTwoMembers_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|kotlin/Any| {
public abstract fun foo(): R|kotlin/Any|
public abstract val x: R|kotlin/Any|
public get(): R|kotlin/Any|
}
public abstract interface C : R|A|, R|B| {
}
public abstract interface D : R|C| {
public abstract override fun foo(): R|kotlin/Any|
public abstract override val x: R|kotlin/Any|
public get(): R|kotlin/Any|
}