Files
kotlin-fork/compiler/testData/diagnostics/tests/cast/IsRecursionSustainable.kt
T
Andrey Breslav 8be40c29cf 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.
2014-03-17 21:55:15 +04:00

6 lines
350 B
Kotlin

open class RecA<T>: <!CYCLIC_INHERITANCE_HIERARCHY!>RecB<T><!>()
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 <!CANNOT_CHECK_FOR_ERASED!>RecA<String><!>