Closed
Bug 914695
Opened 11 years ago
Closed 10 years ago
Arrow functions should not create an "arguments" binding
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 889158
People
(Reporter: wingo, Unassigned)
Details
I am told that SM's arrow functions create an arguments binding. That should not be the case; see http://people.mozilla.org/~jorendorff/es6-draft.html#sec-9.1.16.11, step 7. Arrow functions have "lexical" type.
Comment 1•10 years ago
|
||
The spec link appears to have changed. I think this is current: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-arrow-function-definitions-runtime-semantics-evaluation In this example, the arrow function should ignore the "2" passed to it and print the "1" passed to the lexically enclosing function instead. function f() { return (() => arguments[0])(2); } console.log(f(1)); // prints "2"; should print "1"
Updated•10 years ago
|
Keywords: dev-doc-needed
Whiteboard: [DocArea=JS]
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Comment 2•10 years ago
|
||
Is this a dupe of #889158 ?
Comment 3•10 years ago
|
||
Yeah, think so.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Updated•10 years ago
|
Keywords: dev-doc-needed
Whiteboard: [DocArea=JS]
You need to log in
before you can comment on or make changes to this bug.
Description
•