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