Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect "Parenthesized pattern" error in 4.0.5 #500

Closed
loganfsmyth opened this issue Feb 2, 2017 · 5 comments
Closed

Incorrect "Parenthesized pattern" error in 4.0.5 #500

loganfsmyth opened this issue Feb 2, 2017 · 5 comments

Comments

@loganfsmyth
Copy link

require('acorn').parse('(foo = [])[0] = 4;')

reproduces. Note that it is ES5-only and contains no patterns.

Originally reported in zloirock/core-js#277

@loganfsmyth loganfsmyth changed the title Incorrect "Parenthesized pattern" error Incorrect "Parenthesized pattern" error in 4.0.5 Feb 2, 2017
@marijnh marijnh closed this as completed in f431d07 Feb 2, 2017
@puzrin
Copy link

puzrin commented Feb 3, 2017

https://github.com/nodeca/nodeca.users/blob/master/lib/identicon.js#L39-L49

4.0.7 still has this error with this code. I know it's ugly, but it works and 4.0.4 was ok. Reopen please.

@puzrin
Copy link

puzrin commented Feb 3, 2017

https://github.com/jbt/js-crypto/blob/master/sha1.js better link to test 4.0.7 in es5 mode for "Parenthesized pattern" bug.

@loganfsmyth
Copy link
Author

loganfsmyth commented Feb 3, 2017

A trimmed down example would appear to be

[
  (G = s),
  F = G,
]
require('acorn').parse(`[ (G = s), F = G ]`)

throws on 4.0.7

@marijnh
Copy link
Member

marijnh commented Feb 3, 2017

Patch 9634756 and release 4.0.8 should hide this problem. Opened #503 to track a real solution.

@puzrin
Copy link

puzrin commented Feb 3, 2017

I confirm, no problems with 4.0.8. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants