Closed Bug 848051 Opened 11 years ago Closed 11 years ago

Allow 'arguments' in generator-expressions

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: jorendorff, Assigned: jorendorff)

Details

(Keywords: dev-doc-complete, Whiteboard: [DocArea=JS])

Attachments

(1 file)

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.)
Attached 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+
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
Closed: 11 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.

Attachment

General

Created:
Updated:
Size: