Skip to content

Wrong error location  #3845

@ghost

Description

Many places the error location is wrong and point to wrong char / symbol. I think most of the failing cases are affected.

let {b, b} = {}; report 4th char as the position of b, but that's is a whitespace, but point at {. The second b has also wrong pos reported

Other example

var x = a; const x = b;

([a]) => { const a = 0; }

E.g in this case it point to correct symbol, but the position is wrong.

let x = a; function x(){};

var x; let x;

([foo], [foo]) => {}

In this case the loc points at the generator pos and not the symbol

{ function *foo() {}; function *foo() {}; }

This case is messed up

[...0,a]=0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions