FIR: use only most specific members when building intersection

In this commit we drop less concrete members in intersection.
See for example change in test data: before the commit, we intersected
all three A.foo, B.foo and C.foo in diamond hierarchy. After the commit
we drop A.foo and intersect B.foo and C.foo only.
This commit is contained in:
Mikhail Glukhikh
2021-12-01 11:22:49 +03:00
parent a4f7bee9ad
commit 852475337b
3 changed files with 2 additions and 17 deletions
@@ -1,16 +0,0 @@
interface A {
fun foo() {}
}
interface B : A {
abstract override fun foo()
}
interface C : A {
abstract override fun foo()
}
interface D : A
// Fake override Z#foo should be abstract
<!MANY_INTERFACES_MEMBER_NOT_IMPLEMENTED!>class Z<!> : B, C, D
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
interface A {
fun foo() {}
}