Add duplicated argument check for function rest parameter (#2740)
Also add a missing word from `PARSER_ERR_FORMAL_PARAM_AFTER_REST_PARAMETER` error message. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
committed by
László Langó
parent
1ff322b72f
commit
ca8442c523
@@ -33,6 +33,7 @@ function CheckSyntaxError (str)
|
||||
CheckSyntaxError ('function x (a, b, ...c, d) {}');
|
||||
CheckSyntaxError ('function x (... c = 5) {}');
|
||||
CheckSyntaxError ('function x (...) {}');
|
||||
CheckSyntaxError ('function x (a, a, ...a) {}');
|
||||
CheckSyntaxError ('"use strict" function x (...arguments) {}');
|
||||
|
||||
rest_params = ['hello', true, 7, {}, [], function () {}];
|
||||
|
||||
Reference in New Issue
Block a user