Issue metadata
Sign in to add a comment
|
error in let declaration will break it for good
Reported by
davidcol...@gmail.com,
May 10 2016
|
||||||||||||||||||||||
Issue description
Chrome Version : 50.0.2661.94 (64-bit)
URLs (if applicable) : Dev Tools
Other browsers tested:
Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
Safari:
Firefox:
IE:
What steps will reproduce the problem?
(1) Open Dev Tools
(2) Go to the Console tab
(3) try the following code:
console.log(foo);
let foo = 1;
It should throw a ReferenceError
(4) ask for foo (declared above)
foo
it throws a RefeenceError, foo isn't defined. In this case, we could say that the whole first action (the log AND the let has been ignored)
(5) Try to declare foo
let foo = 2;
It throws a TypeError, and says that foo HAS already been declared
What is the expected result?
The user should have the chance to declare/define the variable at some point
What happens instead?
After it breaks, the variable is useless in a permanent way
Please provide any additional information below. Attach a screenshot if
possible.
,
May 11 2016
Tested the issue on Windows 7 using 50.0.2661.94, latest canary 52.0.2730.0 as per steps in comment #0.Observed the behavior as in screenshots. davidcolacilli@Please find attached screenshots of chrome, firefox and confirm if firefox behavior is the expected one.
,
May 11 2016
Right. foo "is not defined", and foo "can't be defined because is already defined"
,
May 12 2016
Able to reproduce the issue on Windows 7 using chrome latest stable M50-50.0.2661.102. Observed same behavior on other browsers as well. This issue is not specific to chrome and it's seen from past M35-35.0.1849.0 on wards, Hence marking it as untriaged. Thanks!
,
May 13 2016
Confusing as it appears, this is apparently by the spec -- see issue 596061 for details. This did not appear in earlier versions of chrome because we were using different scopes for each evaluated expression in the console. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by davidcol...@gmail.com
, May 10 201627.0 KB
27.0 KB View Download