[FIR] Rename FirElementSerializer.containingDeclaration to currentDeclaration for clarity

This commit is contained in:
Kirill Rakhman
2023-11-08 09:25:28 +01:00
committed by Space Team
parent 7da271bab8
commit c5da2b7433
@@ -67,7 +67,7 @@ import org.jetbrains.kotlin.utils.mapToIndex
class FirElementSerializer private constructor( class FirElementSerializer private constructor(
private val session: FirSession, private val session: FirSession,
private val scopeSession: ScopeSession, private val scopeSession: ScopeSession,
private val containingDeclaration: FirDeclaration?, private val currentDeclaration: FirDeclaration?,
private val typeParameters: Interner<FirTypeParameter>, private val typeParameters: Interner<FirTypeParameter>,
private val extension: FirSerializerExtension, private val extension: FirSerializerExtension,
val typeTable: MutableTypeTable, val typeTable: MutableTypeTable,
@@ -944,7 +944,7 @@ class FirElementSerializer private constructor(
} }
is ConeTypeParameterType -> { is ConeTypeParameterType -> {
val typeParameter = type.lookupTag.typeParameterSymbol.fir val typeParameter = type.lookupTag.typeParameterSymbol.fir
if (typeParameter in ((containingDeclaration as? FirMemberDeclaration)?.typeParameters ?: emptyList())) { if (typeParameter in ((currentDeclaration as? FirMemberDeclaration)?.typeParameters ?: emptyList())) {
builder.typeParameterName = getSimpleNameIndex(typeParameter.name) builder.typeParameterName = getSimpleNameIndex(typeParameter.name)
} else { } else {
builder.typeParameter = getTypeParameterId(typeParameter) builder.typeParameter = getTypeParameterId(typeParameter)