Files
kotlin-fork/compiler/testData/diagnostics/tests/cyclicHierarchy/objectInheritsNested.kt
T
Dmitry Savvinov e17610f378 Don't throw on recursion when computing member scope
When recursion is detected while computing
`ClassResolutionScopesSupport.scopeForMemberDeclarationResolution`,
create 'ThrowingLexicalScope' (as with other scopes), instead of
throwing ISE immediately. That allows to report error properly in cases
like in KT-18514

#KT-18514 Fixed
2017-11-01 15:57:56 +03:00

23 lines
497 B
Kotlin
Vendored

// As in KT-18514
object A : <!CYCLIC_INHERITANCE_HIERARCHY!>A.I<!> {
interface I
}
// Similar to 'classIndirectlyInheritsNested.kt'
object D : <!CYCLIC_INHERITANCE_HIERARCHY!>E<!>() {
open class NestedD
}
open class E : <!CYCLIC_INHERITANCE_HIERARCHY!>D.NestedD<!>()
// Similar to 'twoClassesWithNestedCycle.kt'
object G : <!CYCLIC_INHERITANCE_HIERARCHY!>H.NestedH<!>() {
open class NestedG
}
object H : <!CYCLIC_INHERITANCE_HIERARCHY!>G.NestedG<!>() {
open class NestedH
}