[FIR] Prevent StackOverflowError in FirTypeParameterSymbol
This commit is contained in:
@@ -27,6 +27,8 @@ abstract class FirBasedSymbol<E : FirDeclaration> {
|
|||||||
_fir = e
|
_fir = e
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val isBound get() = _fir != null
|
||||||
|
|
||||||
val origin: FirDeclarationOrigin
|
val origin: FirDeclarationOrigin
|
||||||
get() = fir.origin
|
get() = fir.origin
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -22,7 +22,10 @@ class FirTypeParameterSymbol : FirClassifierSymbol<FirTypeParameter>() {
|
|||||||
|
|
||||||
override fun toLookupTag(): ConeTypeParameterLookupTag = lookupTag
|
override fun toLookupTag(): ConeTypeParameterLookupTag = lookupTag
|
||||||
|
|
||||||
override fun toString(): String = "${this::class.simpleName} ${name.asString()}"
|
override fun toString(): String = when {
|
||||||
|
isBound -> "${this::class.simpleName} ${name.asString()}"
|
||||||
|
else -> "${this::class.simpleName} <unbound>"
|
||||||
|
}
|
||||||
|
|
||||||
val resolvedBounds: List<FirResolvedTypeRef>
|
val resolvedBounds: List<FirResolvedTypeRef>
|
||||||
get() {
|
get() {
|
||||||
|
|||||||
Reference in New Issue
Block a user