Abstract buildResultingSubstitutor & ResultTypeResolver from KotlinType
This commit is contained in:
@@ -476,6 +476,11 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext {
|
||||
override fun captureFromExpression(type: KotlinTypeMarker): KotlinTypeMarker? {
|
||||
return captureFromExpressionInternal(type as UnwrappedType)
|
||||
}
|
||||
|
||||
override fun createErrorTypeWithCustomConstructor(debugName: String, constructor: TypeConstructorMarker): KotlinTypeMarker {
|
||||
require(constructor is TypeConstructor, constructor::errorMessage)
|
||||
return ErrorUtils.createErrorTypeWithCustomConstructor(debugName, constructor)
|
||||
}
|
||||
}
|
||||
|
||||
private fun captureFromExpressionInternal(type: UnwrappedType) = captureFromExpression(type)
|
||||
|
||||
@@ -55,6 +55,8 @@ interface TypeSystemTypeFactoryContext {
|
||||
fun createSimpleType(constructor: TypeConstructorMarker, arguments: List<TypeArgumentMarker>, nullable: Boolean): SimpleTypeMarker
|
||||
fun createTypeArgument(type: KotlinTypeMarker, variance: TypeVariance): TypeArgumentMarker
|
||||
fun createStarProjection(typeParameter: TypeParameterMarker): TypeArgumentMarker
|
||||
|
||||
fun createErrorTypeWithCustomConstructor(debugName: String, constructor: TypeConstructorMarker): KotlinTypeMarker
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user