Closed
Bug 1101653
Opened 10 years ago
Closed 8 years ago
Allow for (const x ... after we have a fresh binding for every iteration
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
platform-rel | --- | ? |
People
(Reporter: evilpies, Assigned: Waldo)
References
Details
(Keywords: dev-doc-complete, DevAdvocacy)
for (const x in {}) has always been banned, because with our current semantics it wouldn't make sense at all. However when every iteration create a new binding it's totally useful.
Updated•9 years ago
|
Keywords: DevAdvocacy
Updated•9 years ago
|
Flags: platform-rel?
Updated•9 years ago
|
platform-rel: --- → ?
Updated•9 years ago
|
Keywords: dev-doc-needed
Assignee | ||
Comment 3•9 years ago
|
||
I have a PR against the Github repo/branch where bug 1263355 is being worked on, that I believe fixes this. Don't anybody bother testing it, tho, because there are known cases (e.g. any for-in/of loop with lexical declaration whose body captures one of those lexical declarations) where the PR falls down, because the underlying branch isn't fully completed yet.
https://github.com/syg/gecko-dev/pull/1
Assignee: nobody → jwalden+bmo
Status: NEW → ASSIGNED
Comment 5•8 years ago
|
||
Fixed by bug 1263355.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Comment 6•8 years ago
|
||
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of#Browser_compatibility
https://developer.mozilla.org/en-US/Firefox/Releases/51#JavaScript
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•