mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user