FIR: Rename stub type for builder inference

This commit is contained in:
Simon Ogorodnik
2021-11-26 15:51:40 +03:00
committed by teamcity
parent 1a288fcdcd
commit bb13583862
18 changed files with 30 additions and 29 deletions
@@ -264,7 +264,7 @@ interface ConeInferenceContext : TypeSystemInferenceExtensionContext, ConeTypeCo
override fun createStubTypeForBuilderInference(typeVariable: TypeVariableMarker): StubTypeMarker {
require(typeVariable is ConeTypeVariable) { "$typeVariable should subtype of ${ConeTypeVariable::class.qualifiedName}" }
return ConeStubTypeForBuilderInference(typeVariable, ConeNullability.create(typeVariable.defaultType().isMarkedNullable()))
return ConeStubTypeForChainInference(typeVariable, ConeNullability.create(typeVariable.defaultType().isMarkedNullable()))
}
override fun createStubTypeForTypeVariablesInSubtyping(typeVariable: TypeVariableMarker): StubTypeMarker {
@@ -429,7 +429,7 @@ interface ConeTypeContext : TypeSystemContext, TypeSystemOptimizationContext, Ty
}
override fun SimpleTypeMarker.isStubTypeForBuilderInference(): Boolean {
return this is ConeStubTypeForBuilderInference
return this is ConeStubTypeForChainInference
}
override fun TypeConstructorMarker.unwrapStubTypeVariableConstructor(): TypeConstructorMarker {
@@ -165,7 +165,7 @@ fun <T : ConeKotlinType> T.withNullability(
ConeNullability.UNKNOWN -> this // TODO: is that correct?
ConeNullability.NOT_NULL -> this
}
is ConeStubTypeForBuilderInference -> ConeStubTypeForBuilderInference(constructor, nullability)
is ConeStubTypeForChainInference -> ConeStubTypeForChainInference(constructor, nullability)
is ConeStubTypeForTypeVariableInSubtyping -> ConeStubTypeForTypeVariableInSubtyping(constructor, nullability)
is ConeDefinitelyNotNullType -> when (nullability) {
ConeNullability.NOT_NULL -> this