[AA] Fix incorrect nullability for KtType created from stub type

^KTIJ-24992 Fixed
This commit is contained in:
aleksandrina-streltsova
2023-03-17 15:28:30 +02:00
committed by teamcity
parent 1d905aa20c
commit 2eab9fc00f
@@ -448,7 +448,8 @@ internal class KtSymbolByFirBuilder constructor(
// TODO this is a temporary hack to prevent FIR IDE from crashing on builder inference, see KT-50916
val typeVariable = coneType.constructor.variable as? ConeTypeParameterBasedTypeVariable
val typeParameterSymbol = typeVariable?.typeParameterSymbol ?: throwUnexpectedElementError(coneType)
val coneTypeParameterType = typeParameterSymbol.toConeType() as ConeTypeParameterType
val coneTypeParameterType = (typeParameterSymbol.toConeType() as ConeTypeParameterType)
.withNullability(coneType.nullability, rootSession.typeContext)
KtFirTypeParameterType(coneTypeParameterType, this@KtSymbolByFirBuilder)
}