Closed
Bug 901987
Opened 11 years ago
Closed 10 years ago
for-of loops do not accept initialisers and are restricted to assignment expressions
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: anba, Assigned: wingo)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.93 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
The following for-of loops should both throw a SyntaxError: --- for (var v=0 of [1]) print(v) for (var v of [1],[2],[3]) print(v) --- (1) for-of loops do not accept an initialiser expression (2) for-of loops only allow assignment expressions as their RHS
Reporter | ||
Updated•11 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 1•10 years ago
|
||
Background: https://bugs.ecmascript.org/show_bug.cgi?id=1163 http://wiki.ecmascript.org/doku.php?id=strawman:simultaneous_iteration
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8388411 -
Flags: review?(jorendorff)
Assignee | ||
Updated•10 years ago
|
Assignee: general → wingo
Assignee | ||
Comment 3•10 years ago
|
||
I should note that the first part of this bug is already fixed and tested by jit-test for-of/syntax-3.js.
Comment 4•10 years ago
|
||
Comment on attachment 8388411 [details] [diff] [review] The RHS of a for-of loop is an assignment expression Review of attachment 8388411 [details] [diff] [review]: ----------------------------------------------------------------- Thanks.
Attachment #8388411 -
Flags: review?(jorendorff) → review+
Assignee | ||
Comment 5•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/39f411171c6f
Flags: in-testsuite+
Comment 6•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/39f411171c6f
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in
before you can comment on or make changes to this bug.
Description
•