shapesecurity / shift-parser-js

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

Script throwing error for the wrong reason #417

Closed Shilpi3 closed 5 years ago

Shilpi3 commented 5 years ago

The script (async (...x = []) => {}); should throw syntax error as REST Formal parameters do not accept default values. However, the script is throwing an error for the wrong reason. Following is the output through the parser.

throw new Error('Not reached');

The test is a part of the test262 test suite.

bakkot commented 5 years ago

Fixed by #418.