Skip to content

Commit 0cda214

Browse files
committed
[CSGen] Don't use one-way constraints for $generator initializer
Don't so would disconnect $generator from `.next()` call which have to be solved together because they sometimes depend on the for-in pattern to infer the element type.
1 parent df1e38f commit 0cda214

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/CSGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3929,7 +3929,7 @@ generateForEachStmtConstraints(
39293929

39303930
auto makeIteratorTarget = SolutionApplicationTarget::forInitialization(
39313931
makeIteratorCall, dc, /*patternType=*/Type(), PB, /*index=*/0,
3932-
target.shouldBindPatternVarsOneWay());
3932+
/*shouldBindPatternsOneWay=*/false);
39333933

39343934
cs.setContextualType(
39353935
sequenceExpr,

0 commit comments

Comments
 (0)