shapesecurity / shift-parser-js

ECMAScript parser that produces a Shift format AST
http://shift-ast.org/parser.html
Apache License 2.0
249 stars 28 forks source link

Error should be thrown if no parameter is specified after ... inside a function argument list #315

Closed Shilpi3 closed 7 years ago

Shilpi3 commented 7 years ago

Following scripts should throw an error

Refer to script 69 function x(...[ a, b ]){}

Refer to script 70 function x({ a: { w, x }, b: [y, z] }, ...[a, b, c]){}

Refer to script 71 (function x(...[ a, b ]){})

Refer to script 75 (function x({ a: { w, x }, b: [y, z] }, ...[a, b, c]){})

Refer to script 76 (...[a, b]) => {}

Refer to script 77 (a, ...[b]) => {}

Refer to script 149 function x(...{ a }){}

Refer to script 151 "use strict"; function x(a, ...[a]){}

Refer to script 248 (a,...[a]) => 0;

Refer to script 519 function x(...{ a }){}

Shilpi3 commented 7 years ago

Duplicate of #313