Merge pull request #33149 from hborla/function-builder-body-result-diags

[Function Builders] Teach diagnostics about function builder body result types...
This commit is contained in:
Holly Borla
2020-07-29 09:04:14 -07:00
committed by GitHub
8 changed files with 57 additions and 6 deletions

View File

@@ -7556,10 +7556,9 @@ bool ConstraintSystem::resolveClosure(TypeVariableType *typeVar,
// If there is a function builder to apply, do so now.
if (functionBuilderType) {
auto *calleeLocator = getCalleeLocator(getConstraintLocator(locator));
if (auto result = matchFunctionBuilder(
closure, functionBuilderType, closureType->getResult(),
ConstraintKind::Conversion, calleeLocator, locator)) {
ConstraintKind::Conversion, locator)) {
return result->isSuccess();
}
}