File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1419,11 +1419,12 @@ namespace {
14191419
14201420 std::pair<bool , Pattern *> walkToPatternPre (Pattern *pattern) override {
14211421 // With multi-statement closure inference enabled, constraint generation
1422- // is responsible for pattern verification and type-checking, so there
1423- // is no need to walk into patterns in that mode.
1424- bool shouldWalkIntoPatterns =
1425- !Ctx.TypeCheckerOpts .EnableMultiStatementClosureInference ;
1426- return {shouldWalkIntoPatterns, pattern};
1422+ // is responsible for pattern verification and type-checking in the body
1423+ // of the closure, so there is no need to walk into patterns.
1424+ bool walkIntoPatterns =
1425+ !(isa<ClosureExpr>(DC) &&
1426+ Ctx.TypeCheckerOpts .EnableMultiStatementClosureInference );
1427+ return {walkIntoPatterns, pattern};
14271428 }
14281429 };
14291430} // end anonymous namespace
You can’t perform that action at this time.
0 commit comments