mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Function Builders] Teach diagnostics about function builder body
result types in order to properly diagnose requirement failures that aren't anchored at an expression.
This commit is contained in:
@@ -7443,10 +7443,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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user