You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this seems to be v8 issue, as its reproducible in chrome, and differs in behavior wrt to firefox:
// chrome:leta=a;// Uncaught ReferenceError: a is not defineda=1;// Uncaught ReferenceError: Cannot access 'a' before initialization// firefox:leta=a;// Uncaught ReferenceError: can't access lexical declaration 'a' before initializationa=1;1
neither violate specs because behavior is undefined
zhanzhenzhen
changed the title
After typing "let a=a", variable a cannot be assigned
In REPL after typing "let a=a", variable a is locked and cannot be assigned
Jan 29, 2021
What steps will reproduce the bug?
In REPL, first type
let a=a
then typea=1
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
The first statement causes an error. The second statement doesn't cause an error.
What do you see instead?
Both the first statement and the second statement cause errors.
Additional information
The text was updated successfully, but these errors were encountered: