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
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// 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
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package
|
||||
|
||||
public object A {
|
||||
private constructor A()
|
||||
|
||||
public interface I {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public object D {
|
||||
private constructor D()
|
||||
|
||||
public open class NestedD {
|
||||
public constructor NestedD()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public open class E {
|
||||
public constructor E()
|
||||
}
|
||||
|
||||
public object G {
|
||||
private constructor G()
|
||||
|
||||
public open class NestedG {
|
||||
public constructor NestedG()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public object H {
|
||||
private constructor H()
|
||||
|
||||
public open class NestedH {
|
||||
public constructor NestedH()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user