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

'import foo { bar } from "bar";' should trigger an error #1046

Closed
ariya opened this issue Feb 16, 2015 · 0 comments
Closed

'import foo { bar } from "bar";' should trigger an error #1046

ariya opened this issue Feb 16, 2015 · 0 comments
Assignees

Comments

@ariya
Copy link
Contributor

ariya commented Feb 16, 2015

The production import foo { bar } from "bar"; is an invalid production, but parses as if it were import foo, { bar } from "bar";, a valid production. (Note the extra comma after the identifier foo.)

Visualization of error:

import foo, { bar } from "bar"; // correct
import foo  { bar } from "bar"; // incorrect
          ^ comma must be required here, yet is automatically inserted.

Affects harmony branch at top of master.

(Migrated from https://code.google.com/p/esprima/issues/detail?id=610, as filed by @IMPinball)

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

No branches or pull requests

1 participant