| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index 45202cb3a82b922c7d487061cfff03578cc3a3c9..6d143965bef7b6cba4c3afa4ff5dc487f455a3ed 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -911,6 +911,7 @@ Parser::Parser(ParseInfo* info)
|
| set_allow_lazy(info->allow_lazy_parsing());
|
| set_allow_natives(FLAG_allow_natives_syntax || info->is_native());
|
| set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions);
|
| + set_allow_harmony_block_function(FLAG_harmony_block_function);
|
| set_allow_harmony_sloppy(FLAG_harmony_sloppy);
|
| set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let);
|
| set_allow_harmony_rest_parameters(FLAG_harmony_rest_parameters);
|
| @@ -2222,8 +2223,10 @@ Statement* Parser::ParseFunctionDeclaration(
|
| VariableMode mode =
|
| is_strong(language_mode())
|
| ? CONST
|
| - : (is_strict(language_mode()) || allow_harmony_sloppy()) &&
|
| - !scope_->is_declaration_scope() ? LET : VAR;
|
| + : (is_strict(language_mode()) || allow_harmony_block_function()) &&
|
| + !scope_->is_declaration_scope()
|
| + ? LET
|
| + : VAR;
|
| VariableProxy* proxy = NewUnresolved(name, mode);
|
| Declaration* declaration =
|
| factory()->NewFunctionDeclaration(proxy, mode, fun, scope_, pos);
|
|
|