Skip to content

using declaration transform does not respect named evaluation #17270

@JLHwung

Description

@JLHwung

💻

  • Would you like to work on a fix?

How are you using Babel?

Programmatic API (babel.transform, babel.parse)

Input code

REPL

using foo = class { static [Symbol.dispose]() {} }
console.log(foo.name)

Configuration file name

No response

Configuration

{
  "plugins": ["@babel/plugin-proposal-explicit-resource-management"]
}

Current and expected behavior

Current: it prints empty string

Expected: it prints foo.

Environment

REPL

Possible solution

TS emits __setFunctionName for the rhs. We can handle this issue in a similar approach.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions