Abstract buildResultingSubstitutor & ResultTypeResolver from KotlinType

This commit is contained in:
Simon Ogorodnik
2019-04-05 17:53:59 +03:00
parent fe2e5b7301
commit 9306f3840f
7 changed files with 32 additions and 23 deletions
@@ -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)