@@ -165,7 +165,6 @@ class SyntacticElementTarget {
165
165
ForEachStmt *stmt;
166
166
DeclContext *dc;
167
167
Pattern *pattern;
168
- GenericEnvironment *packElementEnv;
169
168
ForEachStmtInfo info;
170
169
} forEachPreamble;
171
170
@@ -244,12 +243,10 @@ class SyntacticElementTarget {
244
243
uninitializedVar.type = patternTy;
245
244
}
246
245
247
- SyntacticElementTarget (ForEachStmt *stmt, DeclContext *dc,
248
- GenericEnvironment *packElementEnv)
246
+ SyntacticElementTarget (ForEachStmt *stmt, DeclContext *dc)
249
247
: kind(Kind::forEachPreamble) {
250
248
forEachPreamble.stmt = stmt;
251
249
forEachPreamble.dc = dc;
252
- forEachPreamble.packElementEnv = packElementEnv;
253
250
}
254
251
255
252
// / Form a target for the initialization of a pattern from an expression.
@@ -271,8 +268,9 @@ class SyntacticElementTarget {
271
268
// / Form a target for the preamble of a for-in loop, excluding its where
272
269
// / clause and body.
273
270
static SyntacticElementTarget
274
- forForEachPreamble (ForEachStmt *stmt, DeclContext *dc,
275
- GenericEnvironment *packElementEnv = nullptr );
271
+ forForEachPreamble (ForEachStmt *stmt, DeclContext *dc) {
272
+ return {stmt, dc};
273
+ }
276
274
277
275
// / Form a target for a property with an attached property wrapper that is
278
276
// / initialized out-of-line.
@@ -550,11 +548,6 @@ class SyntacticElementTarget {
550
548
return expression.initialization .patternBindingIndex ;
551
549
}
552
550
553
- GenericEnvironment *getPackElementEnv () const {
554
- assert (isForEachPreamble ());
555
- return forEachPreamble.packElementEnv ;
556
- }
557
-
558
551
const ForEachStmtInfo &getForEachStmtInfo () const {
559
552
assert (isForEachPreamble ());
560
553
return forEachPreamble.info ;
0 commit comments