CYCLIC_INHERITANCE_HIERARCHY reworked
We do not try to recover too gracefully from a cyclic hierarchy any more: we simply remove all the edges that belong to a cycle instead of intelligently finding one most convenient edge to cut. This is done in both lazy and eager resolve to keep tests passing.
This commit is contained in:
@@ -2,10 +2,10 @@ trait A {
|
||||
fun foo() {}
|
||||
}
|
||||
trait B : A, <!CYCLIC_INHERITANCE_HIERARCHY!>E<!> {}
|
||||
trait C : B {}
|
||||
trait C : <!CYCLIC_INHERITANCE_HIERARCHY!>B<!> {}
|
||||
trait D : <!CYCLIC_INHERITANCE_HIERARCHY!>B<!> {}
|
||||
trait E : <!CYCLIC_INHERITANCE_HIERARCHY!>F<!> {}
|
||||
trait F : <!CYCLIC_INHERITANCE_HIERARCHY!>D<!>, C {}
|
||||
trait F : <!CYCLIC_INHERITANCE_HIERARCHY!>D<!>, <!CYCLIC_INHERITANCE_HIERARCHY!>C<!> {}
|
||||
trait G : F {}
|
||||
trait H : F {}
|
||||
|
||||
@@ -21,10 +21,10 @@ val h : H? = null
|
||||
fun test() {
|
||||
a?.foo()
|
||||
b?.foo()
|
||||
c?.foo()
|
||||
d?.foo()
|
||||
c?.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
d?.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
e?.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
f?.foo()
|
||||
g?.foo()
|
||||
h?.foo()
|
||||
}
|
||||
f?.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
g?.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
h?.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
}
|
||||
@@ -3,4 +3,4 @@ open class RecB<T>: <!CYCLIC_INHERITANCE_HIERARCHY!>RecA<T><!>()
|
||||
open class SelfR<T>: <!CYCLIC_INHERITANCE_HIERARCHY!>SelfR<T><!>()
|
||||
|
||||
fun test(f: SelfR<String>) = f is <!CANNOT_CHECK_FOR_ERASED!>RecA<String><!>
|
||||
fun test(f: RecB<String>) = f is RecA<String>
|
||||
fun test(f: RecB<String>) = f is <!CANNOT_CHECK_FOR_ERASED!>RecA<String><!>
|
||||
Reference in New Issue
Block a user