@@ -363,7 +363,7 @@ class ClosureConstraintGenerator
363
363
// Generate constraints to initialize the pattern.
364
364
auto initType =
365
365
cs.generateConstraints (pattern, contextualLocator,
366
- /* shouldBindPatternOneWay=*/ true ,
366
+ /* shouldBindPatternOneWay=*/ false ,
367
367
/* patternBinding=*/ nullptr , /* patternIndex=*/ 0 );
368
368
369
369
if (!initType) {
@@ -434,7 +434,7 @@ class ClosureConstraintGenerator
434
434
{
435
435
auto target = SolutionApplicationTarget::forForEachStmt (
436
436
forEachStmt, sequenceProto, closure,
437
- /* bindTypeVarsOneWay=*/ true ,
437
+ /* bindTypeVarsOneWay=*/ false ,
438
438
/* contextualPurpose=*/ CTP_ForEachSequence);
439
439
440
440
auto &targetInfo = target.getForEachStmtInfo ();
@@ -451,9 +451,9 @@ class ClosureConstraintGenerator
451
451
}
452
452
453
453
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 );
457
457
458
458
if (!patternType) {
459
459
hadError = true ;
0 commit comments