@@ -165,7 +165,6 @@ class SyntacticElementTarget {
165165 ForEachStmt *stmt;
166166 DeclContext *dc;
167167 Pattern *pattern;
168- GenericEnvironment *packElementEnv;
169168 ForEachStmtInfo info;
170169 } forEachPreamble;
171170
@@ -244,12 +243,10 @@ class SyntacticElementTarget {
244243 uninitializedVar.type = patternTy;
245244 }
246245
247- SyntacticElementTarget (ForEachStmt *stmt, DeclContext *dc,
248- GenericEnvironment *packElementEnv)
246+ SyntacticElementTarget (ForEachStmt *stmt, DeclContext *dc)
249247 : kind(Kind::forEachPreamble) {
250248 forEachPreamble.stmt = stmt;
251249 forEachPreamble.dc = dc;
252- forEachPreamble.packElementEnv = packElementEnv;
253250 }
254251
255252 // / Form a target for the initialization of a pattern from an expression.
@@ -271,8 +268,9 @@ class SyntacticElementTarget {
271268 // / Form a target for the preamble of a for-in loop, excluding its where
272269 // / clause and body.
273270 static SyntacticElementTarget
274- forForEachPreamble (ForEachStmt *stmt, DeclContext *dc,
275- GenericEnvironment *packElementEnv = nullptr );
271+ forForEachPreamble (ForEachStmt *stmt, DeclContext *dc) {
272+ return {stmt, dc};
273+ }
276274
277275 // / Form a target for a property with an attached property wrapper that is
278276 // / initialized out-of-line.
@@ -550,11 +548,6 @@ class SyntacticElementTarget {
550548 return expression.initialization .patternBindingIndex ;
551549 }
552550
553- GenericEnvironment *getPackElementEnv () const {
554- assert (isForEachPreamble ());
555- return forEachPreamble.packElementEnv ;
556- }
557-
558551 const ForEachStmtInfo &getForEachStmtInfo () const {
559552 assert (isForEachPreamble ());
560553 return forEachPreamble.info ;
0 commit comments