File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -8991,6 +8991,16 @@ ExprWalker::rewriteTarget(SolutionApplicationTarget target) {
8991
8991
8992
8992
solution.setExprTypes (resultExpr);
8993
8993
result.setExpr (resultExpr);
8994
+
8995
+ // Visit closures that have non-single expression bodies which
8996
+ // could only be processed after contextual expression.
8997
+ if (!ClosuresToTypeCheck.empty ()) {
8998
+ bool hadError = processDelayed ();
8999
+
9000
+ // If any of them failed to type check, bail.
9001
+ if (hadError)
9002
+ return None;
9003
+ }
8994
9004
8995
9005
if (cs.isDebugMode ()) {
8996
9006
auto &log = llvm::errs ();
@@ -9046,10 +9056,9 @@ Optional<SolutionApplicationTarget> ConstraintSystem::applySolution(
9046
9056
auto resultTarget = walker.rewriteTarget (target);
9047
9057
if (!resultTarget)
9048
9058
return None;
9049
-
9050
- // Visit closures that have non-single expression bodies, tap expressions,
9051
- // and possibly other types of AST nodes which could only be processed
9052
- // after contextual expression.
9059
+
9060
+ // Visit tap expressions, and possibly other types of AST nodes which
9061
+ // be processed after contextual expression.
9053
9062
bool hadError = walker.processDelayed ();
9054
9063
9055
9064
// If any of them failed to type check, bail.
You can’t perform that action at this time.
0 commit comments