Closed
Bug 1268812
Opened 9 years ago
Closed 9 years ago
"let" variable used in "for of" not scoped to individual loops
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 449811
People
(Reporter: alancutter, Unassigned)
Details
(Whiteboard: [parity-Chrome][parity-Edge])
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.22 Safari/537.36
Steps to reproduce:
Firefox Nightly: 49.0a1 (2016-04-25)
OS: Linux
Test case: https://jsfiddle.net/pkyce3uw/
let xs = ['P', 'A', 'S', 'S'];
let fs = [];
for (let x of xs) {
fs.push(() => document.body.textContent += x);
}
for (let f of fs) {
f();
}
This test passes in Chrome.
Actual results:
SSSS
Expected results:
PASS
Updated•9 years ago
|
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Whiteboard: [parity-Chrome][parity-Edge]
Updated•9 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
No longer depends on: 449811
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•