Skip to content

Commit d045598

Browse files
authored
Merge pull request #41892 from xedin/remove-last-uses-of-one-way
[CSClosure] Remove last remaining uses of one-way constraints
2 parents f5d4d48 + ab46abb commit d045598

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/Sema/CSClosure.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ class ClosureConstraintGenerator
363363
// Generate constraints to initialize the pattern.
364364
auto initType =
365365
cs.generateConstraints(pattern, contextualLocator,
366-
/*shouldBindPatternOneWay=*/true,
366+
/*shouldBindPatternOneWay=*/false,
367367
/*patternBinding=*/nullptr, /*patternIndex=*/0);
368368

369369
if (!initType) {
@@ -434,7 +434,7 @@ class ClosureConstraintGenerator
434434
{
435435
auto target = SolutionApplicationTarget::forForEachStmt(
436436
forEachStmt, sequenceProto, closure,
437-
/*bindTypeVarsOneWay=*/true,
437+
/*bindTypeVarsOneWay=*/false,
438438
/*contextualPurpose=*/CTP_ForEachSequence);
439439

440440
auto &targetInfo = target.getForEachStmtInfo();
@@ -451,9 +451,9 @@ class ClosureConstraintGenerator
451451
}
452452

453453
void visitCaseItemPattern(Pattern *pattern, ContextualTypeInfo context) {
454-
Type patternType =
455-
cs.generateConstraints(pattern, locator, /*bindPatternVarsOneWay=*/true,
456-
/*patternBinding=*/nullptr, /*patternIndex=*/0);
454+
Type patternType = cs.generateConstraints(
455+
pattern, locator, /*bindPatternVarsOneWay=*/false,
456+
/*patternBinding=*/nullptr, /*patternIndex=*/0);
457457

458458
if (!patternType) {
459459
hadError = true;

0 commit comments

Comments
 (0)