Closed
Bug 1135167
Opened 10 years ago
Closed 10 years ago
Invalid scoping in «for (let i in/of expr)» blocks.
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1069480
People
(Reporter: ChALkeRx, Unassigned)
References
Details
Attachments
(1 file)
(deleted),
text/plain
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36 Steps to reproduce: 1) var i = [1, 2, 3]; for (let i of i) console.log(i); 2) var i = [1, 2, 3]; for (let i in i) console.log(i); 3) for (let i in/of a[i]/f[i]), anything where «expr» depends on «i». Actual results: 1) 1 2 3 2) 0 1 2 3) When evaluting «expr», «i» is taken from outside of the scope. Expected results: 1) Exception 2) Exception 3) Exception See https://people.mozilla.org/~jorendorff/es6-draft.html#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind-labelset
Reporter | ||
Updated•10 years ago
|
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Reporter | ||
Comment 1•10 years ago
|
||
Validated only in nightly-37, after updating to nightly-38 firefox somewhy fails to launch, so I can't check 38 now.
Reporter | ||
Updated•10 years ago
|
Summary: Invalid scoping in «for var i in/of expr» blocks. → Invalid scoping in «for (let i in/of expr)» blocks.
Reporter | ||
Updated•10 years ago
|
Version: 37 Branch → 38 Branch
Reporter | ||
Comment 2•10 years ago
|
||
Just verified in 38.0a1 (2015-02-20).
Updated•10 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•