Skip to content

Wrong error report message for expression {}) #46877

Description

@tuannd89

Version

v19.7.0

Platform

No response

Subsystem

No response

What steps will reproduce the bug?

$ node
> {})
({}))
    ^
Uncaught SyntaxError: Unexpected token ')'

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

Always

What is the expected behavior?

> {})
{})
    ^
Uncaught SyntaxError: Unexpected token ')'

What do you see instead?

> {})
({}))
    ^
Uncaught SyntaxError: Unexpected token ')'

Additional information

We got similar result with expression {}]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    replIssues and PRs related to the REPL subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions