[NI] Extract FE 1.0 specific part from NewCommonSuperTypeCalculator

This commit is contained in:
Dmitriy Novozhilov
2020-08-26 10:51:54 +03:00
parent b21a0213df
commit 12fbb93871
12 changed files with 36 additions and 34 deletions
@@ -68,6 +68,7 @@ interface TypeSystemTypeFactoryContext {
fun createTypeArgument(type: KotlinTypeMarker, variance: TypeVariance): TypeArgumentMarker
fun createStarProjection(typeParameter: TypeParameterMarker): TypeArgumentMarker
fun createErrorType(debugName: String): SimpleTypeMarker
fun createErrorTypeWithCustomConstructor(debugName: String, constructor: TypeConstructorMarker): KotlinTypeMarker
}
@@ -561,6 +561,10 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext, TypeSy
return captureFromExpressionInternal(type as UnwrappedType)
}
override fun createErrorType(debugName: String): SimpleTypeMarker {
return ErrorUtils.createErrorType(debugName)
}
override fun createErrorTypeWithCustomConstructor(debugName: String, constructor: TypeConstructorMarker): KotlinTypeMarker {
require(constructor is TypeConstructor, constructor::errorMessage)
return ErrorUtils.createErrorTypeWithCustomConstructor(debugName, constructor)