New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 679274 link

Starred by 12 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Is not defined and identifier has already been declared at the same time in the console

Reported by bouzli...@gmail.com, Jan 9 2017

Issue description

Chrome Version: 55.0.2883.95
OS Version: OS X 10.11.6
Other browsers tested:
  Firefox 4.x: OK


What steps will reproduce the problem?
1. Type in the devtools console: 'let x = a;' (// Uncaught ReferenceError: a is not defined)
2. Then type in the devtools console: 'x = 2;' (// Uncaught ReferenceError: x is not defined)
3. Then type in the devtools console: 'let x = 2;' (// Uncaught SyntaxError: Identifier 'x' has already been declared)


What is the expected result?

I would expect to be able to either assign value to a variable or declare it without errors. Even after first ReferenceError.


What happens instead of that?

There are some errors thrown.


UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36


StackOverflow question: http://stackoverflow.com/questions/41395939/is-not-defined-and-identifier-has-already-been-declared-at-the-same-time/41415267


 
dUAn6.png
64.4 KB View Download

Comment 1 by ajha@chromium.org, Jan 10 2017

Components: Platform>DevTools
Labels: Needs-Triage-M55

Comment 2 by alph@chromium.org, Jan 10 2017

Components: -Platform>DevTools Platform>DevTools>JavaScript
Labels: -Pri-3 Pri-2
Owner: kozyatinskiy@chromium.org
Status: Assigned (was: Unconfirmed)
Cc: kozyatinskiy@chromium.org
 Issue 771301  has been merged into this issue.
Owner: kozy@chromium.org
Cc: kozy@chromium.org
 Issue 875024  has been merged into this issue.
https://twitter.com/sebmck/status/1030182152715943936?s=19 is a really nice solution.

Make each line a lexical scope, with its parent scope the scope from the line before.
 Issue 875070  has been merged into this issue.
Cc: vamshi.kommuri@chromium.org
 Issue 866267  has been merged into this issue.

Sign in to add a comment