Throw error for using rest parameter in property setter (#3335)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2019-11-20 12:21:05 +01:00
committed by GitHub
parent a0a71da025
commit 7f6f562adb
4 changed files with 10 additions and 0 deletions
+4
View File
@@ -1638,6 +1638,10 @@ parser_parse_function_arguments (parser_context_t *context_p, /**< context */
}
else if (context_p->token.type == LEXER_THREE_DOTS)
{
if (context_p->status_flags & PARSER_IS_PROPERTY_SETTER)
{
parser_raise_error (context_p, PARSER_ERR_SETTER_REST_PARAMETER);
}
lexer_next_token (context_p);
if (duplicated_argument_names)