Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A Identifier declare bug founded in Node.Js REPL #35267

Closed
SmildWind opened this issue Sep 19, 2020 · 2 comments
Closed

A Identifier declare bug founded in Node.Js REPL #35267

SmildWind opened this issue Sep 19, 2020 · 2 comments
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.

Comments

@SmildWind
Copy link

  • Version:
  • Platform:
  • Subsystem:

What steps will reproduce the bug?

when I use node.Js REPL in windows 10 os,I type code like this in commandLine :

node // Welcome to Node.js v14.11.0.
let a =b // "Uncaught ReferenceError: b is not defined"
let a = "helloWorld" // Uncaught SyntaxError: Identifier 'a' has already been declared
a = "helloWorld" // Uncaught ReferenceError: Cannot access 'a' before initialization`

and Then I could'n use "a" forever... util I restart node.JS REPL

How often does it reproduce? Is there a required condition?

I test the node_v12.18.4 and node_v14.11.0 , and both of them has this bug.

@SmildWind SmildWind changed the title A bug found in Node.Js REPL A Identifier declare bug founded in Node.Js REPL Sep 19, 2020
@insomnia-dreams-official

Reproduce the same bug on unbuntu 18.04 and node.js 14.9.0
`
Welcome to Node.js v14.9.0.

let a = b
Uncaught ReferenceError: b is not defined
a = 1
Uncaught ReferenceError: Cannot access 'a' before initialization
let a
Uncaught SyntaxError: Identifier 'a' has already been declared
a = 1
Uncaught ReferenceError: Cannot access 'a' before initialization
let a = 1
Uncaught SyntaxError: Identifier 'a' has already been declared

`

@devsnek
Copy link
Member

devsnek commented Sep 19, 2020

Duplicate of #8309

@devsnek devsnek closed this as completed Sep 19, 2020
@devsnek devsnek added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Sep 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.
Projects
None yet
Development

No branches or pull requests

3 participants