| Index: src/parsing/parser.cc
|
| diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
|
| index 968c78e205df01e0dc581008535d60760dbbb781..991ccc6bb52e517ceaf167e5be032977c3934a0c 100644
|
| --- a/src/parsing/parser.cc
|
| +++ b/src/parsing/parser.cc
|
| @@ -2093,7 +2093,9 @@ Variable* Parser::Declare(Declaration* declaration,
|
| // because the var declaration is hoisted to the function scope where 'x'
|
| // is already bound.
|
| DCHECK(IsDeclaredVariableMode(var->mode()));
|
| - if (is_strict(language_mode()) || allow_harmony_sloppy()) {
|
| + if (is_strict(language_mode()) ||
|
| + (allow_harmony_sloppy() && mode != CONST_LEGACY &&
|
| + var->mode() != CONST_LEGACY)) {
|
| // In harmony we treat re-declarations as early errors. See
|
| // ES5 16 for a definition of early errors.
|
| if (declaration_kind == DeclarationDescriptor::NORMAL) {
|
|
|