-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Closed
Labels
replIssues and PRs related to the REPL subsystem.Issues and PRs related to the REPL subsystem.
Description
Version
20.12.1
Platform
Darwin arm64
Subsystem
No response
What steps will reproduce the bug?
Start the REPL with node, then run this line:
var { ...rest } = await {}How often does it reproduce? Is there a required condition?
100%
What is the expected behaviour? Why is that the expected behaviour?
No error should be thrown.
What do you see instead?
The following error:
Uncaught TypeError: Cannot read properties of undefined (reading 'type')
at registerVariableDeclarationIdentifiers (node:internal/repl/await:98:22)
at node:internal/repl/await:107:15
at Array.forEach (<anonymous>)
at registerVariableDeclarationIdentifiers (node:internal/repl/await:106:13)
at node:internal/repl/await:119:9
at Array.forEach (<anonymous>)
at VariableDeclaration (node:internal/repl/await:118:7)
at visitors.<computed> [as VariableDeclaration] (node:internal/repl/await:147:5)
at c (node:internal/deps/acorn/acorn-walk/dist/walk:58:37)
at skipThrough (node:internal/deps/acorn/acorn-walk/dist/walk:186:39)Additional information
The issue is related to how the REPL handles top-level await.
Metadata
Metadata
Assignees
Labels
replIssues and PRs related to the REPL subsystem.Issues and PRs related to the REPL subsystem.