Closed Bug 1310394 Opened 9 years ago Closed 9 years ago

for-in loops with a name declaration with an initializer should be forbidden in strict mode code

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: Waldo, Assigned: Waldo)

Details

Attachments

(1 file)

https://kangax.github.io/compat-table/es6/ yells at us for this. https://tc39.github.io/ecma262/#sec-initializers-in-forin-statement-heads sez this only applies when parsing non-strict code. Oops.
Attached patch PatchSplinter Review
Attachment #8801446 - Flags: review?(andrebargull)
Comment on attachment 8801446 [details] [diff] [review] Patch Review of attachment 8801446 [details] [diff] [review]: ----------------------------------------------------------------- Thanks! r=me
Attachment #8801446 - Flags: review?(andrebargull) → review+
Pushed by jwalden@mit.edu: https://hg.mozilla.org/integration/mozilla-inbound/rev/90651995f07f for-in loops with a name declaration with an initializer, in strict mode code, should be a syntax error. r=anba
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: