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 {
1419
1419
1420
1420
std::pair<bool , Pattern *> walkToPatternPre (Pattern *pattern) override {
1421
1421
// 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};
1427
1428
}
1428
1429
};
1429
1430
} // end anonymous namespace
You can’t perform that action at this time.
0 commit comments