Allow for (const x ... after we have a fresh binding for every iteration

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: evilpie, Assigned: Waldo)

Tracking

({dev-doc-complete, DevAdvocacy})

unspecified
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(platform-rel ?)

Details

(Reporter)

Description

5 years ago
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.
Blocks: 1142115
(Reporter)

Updated

3 years ago
Duplicate of this bug: 1237395
(Reporter)

Updated

3 years ago
Duplicate of this bug: 1269863
Flags: platform-rel?
platform-rel: --- → ?
(Assignee)

Comment 3

3 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
(Assignee)

Updated

3 years ago
Duplicate of this bug: 1289459

Comment 5

3 years ago
Fixed by bug 1263355.
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.