Index: src/parsing/pattern-rewriter.cc |
diff --git a/src/parsing/pattern-rewriter.cc b/src/parsing/pattern-rewriter.cc |
index 2dad31d8d3a0d1723c392ae3083c746db62ca6ba..6d2ed3d8bb05af405030c8211b708fab7d52cc94 100644 |
--- a/src/parsing/pattern-rewriter.cc |
+++ b/src/parsing/pattern-rewriter.cc |
@@ -171,12 +171,10 @@ void Parser::PatternRewriter::VisitVariableProxy(VariableProxy* pattern) { |
names_->Add(name, zone()); |
} |
- Scope* var_init_scope = descriptor_->scope; |
- MarkTopLevelVariableAsAssigned(var_init_scope, proxy); |
- |
// If there's no initializer, we're done. |
if (value == nullptr) return; |
+ Scope* var_init_scope = descriptor_->scope; |
MarkLoopVariableAsAssigned(var_init_scope, proxy->var()); |
// A declaration of the form: |