Index: src/parsing/rewriter.cc |
diff --git a/src/parsing/rewriter.cc b/src/parsing/rewriter.cc |
index 9a7627e3094bfa663a1119e807602a7797c8fa8f..c5e4452ed7c1cde6adfdb72390c282fc82c4d1e8 100644 |
--- a/src/parsing/rewriter.cc |
+++ b/src/parsing/rewriter.cc |
@@ -362,11 +362,10 @@ bool Rewriter::Rewrite(ParseInfo* info) { |
return true; |
} |
- |
-bool Rewriter::Rewrite(Parser* parser, DoExpression* expr, |
+bool Rewriter::Rewrite(Parser* parser, Scope* outer_scope, DoExpression* expr, |
AstValueFactory* factory) { |
Block* block = expr->block(); |
- Scope* scope = block->scope(); |
+ Scope* scope = block->scope() == nullptr ? outer_scope : block->scope(); |
adamk
2016/07/21 17:15:41
Why should we ever use the block scope here? By yo
|
ZoneList<Statement*>* body = block->statements(); |
VariableProxy* result = expr->result(); |
Variable* result_var = result->var(); |