Skip to content

Error region is weird for redeclared variables #75

Description

@MarcellPerger1

Error region is weird for redeclared variables.
For example, it is

1 |  let foo = 9; let foo;
  |               ^^^^^^^

but should be:

1 |  let foo = 9; let foo;
  |                   ^^^  

Even worse, it is:

1 |  let foo = 9; let foo = 55;
  |               ^^^^^^^^^^^^  

but should be

1 |  let foo = 9; let foo = 55;
  |                   ^^^       

Because we should not highlight the entire expression when the error is just the identifier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-TypeCheckingArea: Type checking/name resolutionT-bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions