| Index: src/parsing/preparser.cc
|
| diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc
|
| index 0377a1b9d35e70ff9cb131ad061e01f7f257888f..f674b09542b40ce2c58e57825c728e693363926e 100644
|
| --- a/src/parsing/preparser.cc
|
| +++ b/src/parsing/preparser.cc
|
| @@ -310,8 +310,11 @@ void PreParser::DeclareAndInitializeVariables(
|
| DCHECK(track_unresolved_variables_);
|
| for (auto variable : *(declaration->pattern.variables_)) {
|
| declaration_descriptor->scope->RemoveUnresolved(variable);
|
| - scope()->DeclareVariableName(variable->raw_name(),
|
| - declaration_descriptor->mode);
|
| + Variable* var = scope()->DeclareVariableName(
|
| + variable->raw_name(), declaration_descriptor->mode);
|
| + if (FLAG_preparser_scope_analysis) {
|
| + MarkLoopVariableAsAssigned(declaration_descriptor->scope, var);
|
| + }
|
| if (names) {
|
| names->Add(variable->raw_name(), zone());
|
| }
|
|
|