[FIR] Prevent StackOverflowError in FirTypeParameterSymbol

This commit is contained in:
Nikolay Lunyak
2022-10-20 10:46:15 +03:00
committed by teamcity
parent dd861515ad
commit c4fa1ed9d8
2 changed files with 6 additions and 1 deletions
@@ -27,6 +27,8 @@ abstract class FirBasedSymbol<E : FirDeclaration> {
_fir = e
}
val isBound get() = _fir != null
val origin: FirDeclarationOrigin
get() = fir.origin
@@ -22,7 +22,10 @@ class FirTypeParameterSymbol : FirClassifierSymbol<FirTypeParameter>() {
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>
get() {