Closed
Bug 1025134
Opened 10 years ago
Closed 10 years ago
"for(let a of array) command;" scoped differently then "for(let a of array){ command; }"
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: blindwanderer, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release) Build ID: 20140506152807 Steps to reproduce: for(let field of groupProxies) proxied[field] = {get: function(){ return field; }, enumerable:true}; Actual results: It executed as if it were: for(var field of groupProxies){ proxied[field] = {get: function(){ return field; }, enumerable:true}; } Expected results: It should have executed like: for(let field of groupProxies){ proxied[field] = {get: function(){ return field; }, enumerable:true}; } (which works as expected)
Reporter | ||
Comment 1•10 years ago
|
||
To some things up, the curly brackets determine if "let" is treated as "let" or as if it were a "var".
Reporter | ||
Comment 2•10 years ago
|
||
o_o!!! I can't get this to produce the expected result at all!!! It was working the other day I swear. wtf. sorry. Since the expected result never works it can' really be a scoping bug. sorry.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•