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:
Andrey Breslav
2014-02-28 20:02:38 +04:00
parent ed81102b2f
commit 8be40c29cf
8 changed files with 167 additions and 105 deletions
+7 -7
View File
@@ -2,10 +2,10 @@ trait A {
fun foo() {}
}
trait B : A, <error>E</error> {}
trait C : B {}
trait C : <error>B</error> {}
trait D : <error>B</error> {}
trait E : <error>F</error> {}
trait F : <error>D</error>, C {}
trait F : <error>D</error>, <error>C</error> {}
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?.<error>foo</error>()
d?.<error>foo</error>()
e?.<error>foo</error>()
f?.foo()
g?.foo()
h?.foo()
f?.<error>foo</error>()
g?.<error>foo</error>()
h?.<error>foo</error>()
}