@@ -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