Allow 'arguments' in generator-expressions

RESOLVED FIXED in mozilla22

Status

()

defect
RESOLVED FIXED
6 years ago
4 years ago

People

(Reporter: jorendorff, Assigned: jorendorff)

Tracking

({dev-doc-complete})

Other Branch
mozilla22
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [DocArea=JS])

Attachments

(1 attachment)

Generator expressions should inherit 'arguments' from the enclosing lexical scope just like any other name. ...Right? (This turns out to be ridiculously easy to implement. Embarrassed I didn't do it earlier. It just needs some tests.)
Assignee

Comment 1

6 years ago
Posted patch v1Splinter Review
Attachment #721506 - Flags: review?(ejpbruel)
Comment on attachment 721506 [details] [diff] [review]
v1

Review of attachment 721506 [details] [diff] [review]:
-----------------------------------------------------------------

So if I'm reading this patch right, all you had to do was *not* throw an error if a generator expression has arguments as a lexical dependency? That's pretty simple, indeed :-)

Anyway, the fix is trivial, and looks well tested, so really I have nothing to add here. r+
Attachment #721506 - Flags: review?(ejpbruel) → review+
Assignee

Comment 3

6 years ago
I had to change some existing tests to get this through try server -- all of them were specifically testing that 'arguments' was a SyntaxError in a generator-expression.

https://hg.mozilla.org/integration/mozilla-inbound/rev/4cb73e976b28
https://hg.mozilla.org/mozilla-central/rev/4cb73e976b28
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Whiteboard: [DocArea=JS]
You need to log in before you can comment on or make changes to this bug.