Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/scopes/intersectionOverrideOfTwoMembers_java.overrides.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

18 lines
1.3 KiB
Plaintext
Vendored

C:
[IntersectionOverride]: public abstract fun foo(): R|kotlin/Any| from Use site scope of /C [id: 0]
[Source]: public abstract fun foo(): R|kotlin/Any| from Use site scope of /A [id: 1]
[Source]: public abstract fun foo(): R|kotlin/Any| from Use site scope of /B [id: 2]
[IntersectionOverride]: public abstract val x: R|kotlin/Any| from Use site scope of /C [id: 0]
[Source]: public abstract val x: R|kotlin/Any| from Use site scope of /A [id: 1]
[Source]: public abstract val x: R|kotlin/Any| from Use site scope of /B [id: 2]
D:
[Source]: public abstract override fun foo(): R|kotlin/Any| from Use site scope of /D [id: 0]
[IntersectionOverride]: public abstract fun foo(): R|kotlin/Any| from Use site scope of /C [id: 1]
[Source]: public abstract fun foo(): R|kotlin/Any| from Use site scope of /A [id: 2]
[Source]: public abstract fun foo(): R|kotlin/Any| from Use site scope of /B [id: 3]
[Source]: public abstract override val x: R|kotlin/Any| from Use site scope of /D [id: 0]
[IntersectionOverride]: public abstract val x: R|kotlin/Any| from Use site scope of /C [id: 1]
[Source]: public abstract val x: R|kotlin/Any| from Use site scope of /A [id: 2]
[Source]: public abstract val x: R|kotlin/Any| from Use site scope of /B [id: 3]