| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index 45202cb3a82b922c7d487061cfff03578cc3a3c9..52936198f0f37647596db79f52c3b94b8074b0af 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -2019,7 +2019,8 @@ Variable* Parser::Declare(Declaration* declaration,
|
| declaration_scope->is_strict_eval_scope() ||
|
| declaration_scope->is_block_scope() ||
|
| declaration_scope->is_module_scope() ||
|
| - declaration_scope->is_script_scope()) {
|
| + declaration_scope->is_script_scope() ||
|
| + (declaration_scope->is_eval_scope() && IsLexicalVariableMode(mode))) {
|
| // Declare the variable in the declaration scope.
|
| var = declaration_scope->LookupLocal(name);
|
| if (var == NULL) {
|
| @@ -2099,7 +2100,8 @@ Variable* Parser::Declare(Declaration* declaration,
|
| var = new (zone()) Variable(declaration_scope, name, mode, kind,
|
| kNeedsInitialization, kNotAssigned);
|
| } else if (declaration_scope->is_eval_scope() &&
|
| - is_sloppy(declaration_scope->language_mode())) {
|
| + is_sloppy(declaration_scope->language_mode()) &&
|
| + !IsLexicalVariableMode(mode)) {
|
| // For variable declarations in a sloppy eval scope the proxy is bound
|
| // to a lookup variable to force a dynamic declaration using the
|
| // DeclareLookupSlot runtime function.
|
|
|