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

no warning when using const out of strict mode #3318

Closed
tejasmanohar opened this issue Oct 11, 2015 · 2 comments
Closed

no warning when using const out of strict mode #3318

tejasmanohar opened this issue Oct 11, 2015 · 2 comments
Labels
v8 engine Issues and PRs related to the V8 dependency.

Comments

@tejasmanohar
Copy link

I get this warning-
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
when I use let out of strict mode but no warning when I use const out of it? the docs here say const is only available in strict-mode as well? https://nodejs.org/en/docs/es6/

I see that I don't get a SyntaxError when mutating variables declared w/ const out of strict mode anyhow, but that part is reasonable.

@ChALkeR ChALkeR added the v8 engine Issues and PRs related to the V8 dependency. label Oct 11, 2015
@tejasmanohar
Copy link
Author

see #230. @targos has clarified this here- koajs/koa#501 (comment). i'll keep this issue open till that's merged (or resolved in another way).

@bnoordhuis
Copy link
Member

I'm going to close this. let/const in sloppy mode is a V8 issue. Work is underway upstream to implement the ES6 semantics and that will eventually make its way into node.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

No branches or pull requests

3 participants