Index: src/parsing/parser.cc |
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc |
index aeef16bb6a34c7b0ad671fd5355d2bcc0c62dfff..56e2a920317f60a4b2821d99e8bf61aaaa76c018 100644 |
--- a/src/parsing/parser.cc |
+++ b/src/parsing/parser.cc |
@@ -4010,6 +4010,10 @@ FunctionLiteral* Parser::ParseFunctionLiteral( |
// Parsing the body may change the language mode in our scope. |
language_mode = scope->language_mode(); |
+ scope->DeclareArguments(ast_value_factory()); |
+ if (main_scope != scope) { |
+ main_scope->DeclareArguments(ast_value_factory()); |
+ } |
// Validate name and parameter names. We can do this only after parsing the |
// function, since the function can declare itself strict. |