Skip to content

Repl prints an error twice #27804

Open
Open
@nicolo-ribaudo

Description

Version: Deno 2.1.7

  1. Run deno to start the repl
  2. Execute for (console.log("a") of [1]);

It reports the syntax error twice:

➜ deno            
Deno 2.1.7
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
> for (console.log("a") of [1]);
error: The left-hand side of an assignment expression must be a variable or a property access. at file:///repl.tsx:1:6

  for (console.log("a") of [1]);
       ~~~~~~~~~~~~~~~~

The left-hand side of an assignment expression must be a variable or a property access. at file:///repl.tsx:1:6

  for (console.log("a") of [1]);
       ~~~~~~~~~~~~~~~~

This is not a SWC bug (in their playground they only report it once), and I couldn't find other syntax errors that are printed twice.

I cannot find any other error for which this happens.

Metadata

Assignees

No one assigned

    Labels

    replrelated to the Read-Eval-Print-Loop functionality of Deno

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions