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

No parameter name after ... in a function signature does not produce an error in "fail" scipts #313

Closed Shilpi3 closed 7 years ago

Shilpi3 commented 7 years ago

Script 69: function x(...[ a, b ]){} Script 70: function x({ a: { w, x }, b: [y, z] }, ...[a, b, c]){} Script 71: (function x(...[ a, b ]){}) Script 75: (function x({ a: { w, x }, b: [y, z] }, ...[a, b, c]){}) Script 76: (...[a, b]) => {} Script 77: (a, ...[b]) => {} Script 149: function x(...{ a }){} Script 151: "use strict"; function x(a, ...[a]){} Script 248: (a,...[a]) => 0; Script 519: function x(...{ a }){}

Expected: An Exception Actual: No Exception

bakkot commented 7 years ago

These tests are all invalid. Opened https://github.com/tc39/test262-parser-tests/issues/9 and https://github.com/tc39/test262-parser-tests/issues/10.