Skip to content

semantic: incorrect semantic check for has same name LabeledStatement nested in LabeledStatement  #5036

@Dunqing

Description

@Dunqing

Reproduction:

This bug was found in https://github.com/oxc-project/monitor-oxc/actions/runs/10482911458/job/29034791059

Minimal reproduction

oxc playground

TOP: {
  L: console.log(1);
  L: console.log(2);
};

The above code reports the following errors in the playground

❗ Identifier `L` has already been declared
❗ Identifier `L` has already been declared

Expected result

There are no semantic errors. I've run the code in Chrome devtools and that works well

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-semanticArea - SemanticC-bugCategory - Buggood first issueExperience Level - Good for newcomers

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions