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

Dynamic import doesn't work with generators #1781

Closed
ghost opened this issue Mar 13, 2017 · 5 comments
Closed

Dynamic import doesn't work with generators #1781

ghost opened this issue Mar 13, 2017 · 5 comments

Comments

@ghost
Copy link

ghost commented Mar 13, 2017

Implemented dynamic import support in Esprima does not work with generators.

Steps to reproduce

esprima.parse((`function* a() {
  yield import('http');
}`)

Expected output

Should parse

Actual output

Throws an syntax error

Relevant references

A relevant reference has to be the similiar test case for Babylon

@michaelficarra
Copy link
Contributor

Please don't refer to future ECMAScript features as ES20XX unless they have reached stage 4 and been incorporated into the appropriate draft spec. Until then, they may never make it into the specification, let alone a particular year.

@ghost
Copy link
Author

ghost commented Mar 15, 2017

@michaelficarra I am aware of this, but this was reported because this feature have been implemented into Esprima as seen here

@mikesherov
Copy link
Member

mikesherov commented Mar 15, 2017

Thanks for contributing, @nowindowsowrking! As usual, you catch everything. @michaelficarra's point was simply that you shouldnt refer to them as "2018 dynamic imports", not that the report was invalid.

@ghost
Copy link
Author

ghost commented Mar 15, 2017

@mikesherov Removed 2018 reference. BTW. There are also a few other issues with other features implemented belonging to the upcoming 5.0 version. I am right if I say there are no point to report them because the specs will probably change?

@mikesherov
Copy link
Member

You can and should definitely report issues for code that is in the Esprima master branch.

@ghost ghost closed this as completed Apr 3, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants