FIR: Fix synthetic type variables to independent stub types

This commit is contained in:
Simon Ogorodnik
2021-11-26 16:51:42 +03:00
committed by teamcity
parent 580410863f
commit df9da371cb
4 changed files with 34 additions and 15 deletions
@@ -322,7 +322,11 @@ fun ConeIntersectionType.mapTypes(func: (ConeKotlinType) -> ConeKotlinType): Con
return ConeIntersectionType(intersectedTypes.map(func), alternativeType?.let(func))
}
data class ConeStubTypeConstructor(val variable: ConeTypeVariable, val isTypeVariableInSubtyping: Boolean) : TypeConstructorMarker
data class ConeStubTypeConstructor(
val variable: ConeTypeVariable,
val isTypeVariableInSubtyping: Boolean,
val isForFixation: Boolean = false,
) : TypeConstructorMarker
sealed class ConeStubType(val constructor: ConeStubTypeConstructor, override val nullability: ConeNullability) : StubTypeMarker,
ConeSimpleKotlinType() {
@@ -363,6 +367,9 @@ open class ConeStubTypeForBuilderInference(constructor: ConeStubTypeConstructor,
)
}
class ConeStubTypeForFixation(constructor: ConeStubTypeConstructor, nullability: ConeNullability) :
ConeStubTypeForBuilderInference(constructor, nullability)
class ConeStubTypeForTypeVariableInSubtyping(constructor: ConeStubTypeConstructor, nullability: ConeNullability) :
ConeStubType(constructor, nullability) {
constructor(variable: ConeTypeVariable, nullability: ConeNullability) : this(