Merge remote-tracking branch 'origin/main' into rebranch

This commit is contained in:
swift-ci
2023-09-16 08:12:44 -07:00
55 changed files with 2981 additions and 1365 deletions

View File

@@ -7312,24 +7312,13 @@ bool ConstraintSystem::participatesInInference(ClosureExpr *closure) const {
if (getAppliedResultBuilderTransform(closure))
return true;
if (closure->hasSingleExpressionBody())
return true;
if (Options.contains(ConstraintSystemFlags::LeaveClosureBodyUnchecked))
return false;
if (closure->hasEmptyBody())
return false;
// If body is nested in a parent that has a function builder applied,
// let's prevent inference until result builders.
if (Options.contains(
ConstraintSystemFlags::
ClosuresInResultBuildersDontParticipateInInference)) {
return !isInResultBuilderContext(closure);
} else {
return true;
}
return true;
}
TypeVarBindingProducer::TypeVarBindingProducer(BindingSet &bindings)