Abstract TypeApproximator from NewCapturedType

This commit is contained in:
Simon Ogorodnik
2019-04-08 15:46:57 +03:00
parent 9306f3840f
commit 57a3b1a773
4 changed files with 30 additions and 13 deletions
@@ -481,6 +481,11 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext {
require(constructor is TypeConstructor, constructor::errorMessage)
return ErrorUtils.createErrorTypeWithCustomConstructor(debugName, constructor)
}
override fun TypeConstructorMarker.isCapturedTypeConstructor(): Boolean {
return this is NewCapturedTypeConstructor
}
}
private fun captureFromExpressionInternal(type: UnwrappedType) = captureFromExpression(type)