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 @@ -1420,11 +1420,12 @@ namespace {
1420
1420
1421
1421
std::pair<bool , Pattern *> walkToPatternPre (Pattern *pattern) override {
1422
1422
// With multi-statement closure inference enabled, constraint generation
1423
- // is responsible for pattern verification and type-checking, so there
1424
- // is no need to walk into patterns in that mode.
1425
- bool shouldWalkIntoPatterns =
1426
- !Ctx.TypeCheckerOpts .EnableMultiStatementClosureInference ;
1427
- return {shouldWalkIntoPatterns, pattern};
1423
+ // is responsible for pattern verification and type-checking in the body
1424
+ // of the closure, so there is no need to walk into patterns.
1425
+ bool walkIntoPatterns =
1426
+ !(isa<ClosureExpr>(DC) &&
1427
+ Ctx.TypeCheckerOpts .EnableMultiStatementClosureInference );
1428
+ return {walkIntoPatterns, pattern};
1428
1429
}
1429
1430
};
1430
1431
} // end anonymous namespace
You can’t perform that action at this time.
0 commit comments