mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 22:28:12 +00:00
LibJS: Disallow multiple parameters in paren-less arrow function
Fixes #2323.
This commit is contained in:
parent
84b508befa
commit
27913154ea
2 changed files with 6 additions and 1 deletions
|
@ -287,7 +287,7 @@ RefPtr<FunctionExpression> Parser::try_parse_arrow_function_expression(bool expe
|
|||
i32 function_length = -1;
|
||||
while (true) {
|
||||
if (match(TokenType::Comma)) {
|
||||
if (has_rest_parameter) {
|
||||
if (has_rest_parameter || !expect_parens) {
|
||||
parse_failed = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue