[FIR] Introduce new kind of integer literal types for constant operator calls

This commit is contained in:
Dmitriy Novozhilov
2022-02-04 17:14:33 +03:00
committed by teamcity
parent bb5217be72
commit b980f5ab32
12 changed files with 185 additions and 111 deletions
@@ -436,7 +436,8 @@ internal class KtSymbolByFirBuilder private constructor(
is ConeIntersectionType -> KtFirIntersectionType(coneType, token, this@KtSymbolByFirBuilder)
is ConeDefinitelyNotNullType -> KtFirDefinitelyNotNullType(coneType, token, this@KtSymbolByFirBuilder)
is ConeCapturedType -> KtFirCapturedType(coneType, token, this@KtSymbolByFirBuilder)
is ConeIntegerLiteralType -> KtFirIntegerLiteralType(coneType, token, this@KtSymbolByFirBuilder)
is ConeIntegerLiteralConstantType -> KtFirIntegerLiteralType(coneType, token, this@KtSymbolByFirBuilder)
is ConeIntegerConstantOperatorType -> buildKtType(coneType.getApproximatedType())
is ConeStubTypeForChainInference -> {
// 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
@@ -230,7 +230,7 @@ internal class KtFirIntersectionType(
}
internal class KtFirIntegerLiteralType(
override val coneType: ConeIntegerLiteralType,
override val coneType: ConeIntegerLiteralConstantType,
override val token: ValidityToken,
private val builder: KtSymbolByFirBuilder,
) : KtIntegerLiteralType(), KtFirType {