[ConstraintSystem] Solve where clauses of for-in loops separately

Doing so fits better into conjunction model which leads to more
granular control over what variables are brought into scope during
`where` clause expression checking.

These changes also remove "one-way bind" flag from "for-in" statement
target.
This commit is contained in:
Pavel Yaskevich
2023-09-26 18:03:00 -07:00
parent 8edf870e4b
commit 72caaa8cfe
5 changed files with 30 additions and 20 deletions

View File

@@ -178,9 +178,8 @@ SyntacticElementTarget SyntacticElementTarget::forInitialization(
SyntacticElementTarget
SyntacticElementTarget::forForEachStmt(ForEachStmt *stmt, DeclContext *dc,
bool bindPatternVarsOneWay) {
SyntacticElementTarget target(
stmt, dc, bindPatternVarsOneWay || bool(stmt->getWhere()));
bool ignoreWhereClause) {
SyntacticElementTarget target(stmt, dc, ignoreWhereClause);
return target;
}