Invalid function parameter with async function name mistakenly produces a valid syntax
Open
@ariya is already working on this.
Since Oct 29, 2016.
defect
es2017
- Dominant language
- TypeScript
- Stars
- 7.1k
- Forks
- 773
- PR merge metrics
- No merged PRs in 30d
Description
Test case:
esprima.parse('async({x=y})')
Expected: An exception is thrown:
Error: Line 1: Unexpected token =
Actual output: A syntax tree:
Script {
type: 'Program',
body: [ ExpressionStatement { type: 'ExpressionStatement', expression: [Object] } ],
sourceType: 'script' }
Affected version: master branch revision c634d6f0.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.