Status: New
Owner: ----
New issue 3938 by [email protected]: const bindings in for loop:
invalid assignment in next expression
https://code.google.com/p/v8/issues/detail?id=3938
While migrating the block-scoping tests to test262, I couldn't find a test
for the following:
for (const i = 0; i < 1; i++) { }
Which should be a runtime error. This code does not currently produce any
error:
$ v8 --use_strict --harmony_scoping
V8 version 4.2.0 (candidate) [console: dumb]
d8> for (const i = 0; i < 1; i++) { print(i); }
0
1
i++ shouldn't be allowed, since i is a const binding.
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-for-statement-runtime-semantics-labelledevaluation
Under:
IterationStatement : for ( LexicalDeclaration Expressionopt ; Expressionopt
) Statement
Step 5.a.1
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.