@@ -4854,8 +4854,8 @@ class ConstraintSystem {
48544854 // / Simplify a closure body element constraint by generating required
48554855 // / constraints to represent the given element in constraint system.
48564856 SolutionKind simplifyClosureBodyElementConstraint (
4857- ASTNode element, ContextualTypeInfo context, bool isDiscarded ,
4858- TypeMatchOptions flags, ConstraintLocatorBuilder locator);
4857+ ASTNode element, ContextualTypeInfo context, TypeMatchOptions flags ,
4858+ ConstraintLocatorBuilder locator);
48594859
48604860public: // FIXME: Public for use by static functions.
48614861 // / Simplify a conversion constraint with a fix applied to it.
@@ -5014,8 +5014,7 @@ class ConstraintSystem {
50145014 // / \param replaceInvalidRefsWithErrors Indicates whether it's allowed
50155015 // / to replace any discovered invalid member references with `ErrorExpr`.
50165016 static bool preCheckExpression (Expr *&expr, DeclContext *dc,
5017- bool replaceInvalidRefsWithErrors,
5018- bool leaveClosureBodiesUnchecked);
5017+ bool replaceInvalidRefsWithErrors);
50195018
50205019 // / Solve the system of constraints generated from provided target.
50215020 // /
@@ -5246,16 +5245,6 @@ class ConstraintSystem {
52465245 // / imported from C/ObjectiveC.
52475246 bool isArgumentOfImportedDecl (ConstraintLocatorBuilder locator);
52485247
5249- // / Check whether given closure should participate in inference e.g.
5250- // / if it's a single-expression closure - it always does, but
5251- // / multi-statement closures require special flags.
5252- bool participatesInInference (ClosureExpr *closure) const ;
5253-
5254- // / Visit each subexpression that will be part of the constraint system
5255- // / of the given expression, including those in closure bodies that will be
5256- // / part of the constraint system.
5257- void forEachExpr (Expr *expr, llvm::function_ref<Expr *(Expr *)> callback);
5258-
52595248 SWIFT_DEBUG_DUMP;
52605249 SWIFT_DEBUG_DUMPER (dump(Expr *));
52615250
@@ -6080,6 +6069,18 @@ BraceStmt *applyResultBuilderTransform(
60806069 constraints::SolutionApplicationTarget)>
60816070 rewriteTarget);
60826071
6072+ // / Determine whether the given closure expression should be type-checked
6073+ // / within the context of its enclosing expression. Otherwise, it will be
6074+ // / separately type-checked once its enclosing expression has determined all
6075+ // / of the parameter and result types without looking at the body.
6076+ bool shouldTypeCheckInEnclosingExpression (ClosureExpr *expr);
6077+
6078+ // / Visit each subexpression that will be part of the constraint system
6079+ // / of the given expression, including those in closure bodies that will be
6080+ // / part of the constraint system.
6081+ void forEachExprInConstraintSystem (
6082+ Expr *expr, llvm::function_ref<Expr *(Expr *)> callback);
6083+
60836084// / Whether the given parameter requires an argument.
60846085bool parameterRequiresArgument (
60856086 ArrayRef<AnyFunctionType::Param> params,
0 commit comments