Closed
Bug 572589
Opened 15 years ago
Closed 10 years ago
1.8 style destructuring without var/let incorrectly assigns to global, skipping intermediate scope
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: murky.satyr, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a6pre) Gecko/20100616 Minefield/3.7a6pre (.NET CLR 3.5.30729)
var x = 0;
function outer(x){
return function inner(x){
0, {x} = {x: 789};
return x;
}
}
[outer(123)(456), x]
The above produces [456, 789], which should be [789, 0].
It works correctly if I replaced the "0," with "var".
Reproducible: Always
Steps to Reproduce:
1. Open Error Console
2. Type in: [x = 0, (function(x)({x} = {x: 2}, x))(1), x]
3. Evaluate
Actual Results:
0,1,2
Expected Results:
0,2,0
Updated•15 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
Updated•11 years ago
|
Assignee: general → nobody
Comment 1•10 years ago
|
||
No longer reproducible - Resolving as WFM.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•