Index: src/parsing/parser.cc |
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc |
index 66241e1a11aae9e4b17adb3f467dae154aec602e..90125da5226b756554a7718e4562ee371fbeed4e 100644 |
--- a/src/parsing/parser.cc |
+++ b/src/parsing/parser.cc |
@@ -5113,7 +5113,11 @@ void Parser::InsertSloppyBlockFunctionVarBindings(Scope* scope, |
auto delegates = static_cast<SloppyBlockFunctionMap::Vector*>(p->value); |
for (SloppyBlockFunctionStatement* delegate : *delegates) { |
// Check if there's a conflict with a lexical declaration |
- Scope* outer_scope = scope->outer_scope(); |
+ Scope* decl_scope = scope; |
+ while (decl_scope->is_eval_scope()) { |
+ decl_scope = decl_scope->outer_scope()->DeclarationScope(); |
Dan Ehrenberg
2016/07/01 23:55:53
It feels like this will search a little too far. D
|
+ } |
+ Scope* outer_scope = decl_scope->outer_scope(); |
Scope* query_scope = delegate->scope()->outer_scope(); |
Variable* var = nullptr; |
bool should_hoist = true; |