Closed
Bug 1107712
Opened 10 years ago
Closed 9 years ago
Make scoping for formals default initializer ES6-compliant
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
DUPLICATE
of bug 1022967
People
(Reporter: shu, Assigned: mrrrgn)
References
(Blocks 1 open bug)
Details
According to ES6, expressions in a function's formals get its own scope that is the parent of the locals scope. Consider:
function f(x = 42, y = function () { x++ }) {
var x = 0;
y();
print(x); // supposed to print 0
}
See 9.2.13.26 [1]
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-functiondeclarationinstantiation
We totally don't do this right now.
Assignee | ||
Updated•9 years ago
|
QA Contact: winter2718
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → winter2718
QA Contact: winter2718
Assignee | ||
Comment 1•9 years ago
|
||
In light of this irc conversation I'll bug Shu on IRC before starting work on this bug: http://logs.glob.uno/?c=mozilla%23jsapi&s=26+Feb+2016&e=26+Feb+2016#c703620
Reporter | ||
Comment 2•9 years ago
|
||
I was going to ask who opened this bug, and is it a dupe of bug 1022967. It turns out that I opened this bug, and yes.
Morgan, do you want to take a stab at this? I assigned myself to bug 1022967, but if you are interested in taking it I can advise.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•