| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index b57a545ffe0c6940f3d1fcc6dc6bfc71221081e9..6d006957c884d6d204444099b34009507d429f42 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -3611,6 +3611,10 @@ bool CheckAndDeclareArrowParameter(ParserTraits* traits, Expression* expression,
|
| // Case for a single parameter:
|
| // (foo) => ...
|
| // foo => ...
|
| + bool is_rest;
|
| + if ((is_rest = expression->IsSpread())) {
|
| + expression = expression->AsSpread()->expression();
|
| + }
|
| if (expression->IsVariableProxy()) {
|
| if (expression->AsVariableProxy()->is_this()) return false;
|
|
|
| @@ -3625,7 +3629,7 @@ bool CheckAndDeclareArrowParameter(ParserTraits* traits, Expression* expression,
|
| return false;
|
| }
|
|
|
| - scope->DeclareParameter(raw_name, VAR);
|
| + scope->DeclareParameter(raw_name, VAR, is_rest);
|
| ++(*num_params);
|
| return true;
|
| }
|
| @@ -4178,8 +4182,9 @@ ClassLiteral* Parser::ParseClassLiteral(const AstRawString* name,
|
|
|
| Expression* extends = NULL;
|
| if (Check(Token::EXTENDS)) {
|
| + const bool maybeArrow = false;
|
| block_scope->set_start_position(scanner()->location().end_pos);
|
| - extends = ParseLeftHandSideExpression(CHECK_OK);
|
| + extends = ParseLeftHandSideExpression(maybeArrow, CHECK_OK);
|
| } else {
|
| block_scope->set_start_position(scanner()->location().end_pos);
|
| }
|
|
|