You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* This category applies to class and generator */letx=0||class{};lety=0||function*(){};letz=1&&class{};letw=1&&function*(){};letp=null??class{};letr=null??function*(){};
Configuration file name
No response
Configuration
No response
Current and expected behavior
Hello, I've read the comment that Babel doesn't aim at perfectly matching the spec. Just in case, I'll let you know the rest of the name property issues I found.
Also, I divided these name property issues into several cases because I think these cases are from distinct reasons.
Running the input code, x.name should be '' but it is '_class' in the transpiled code. y.name should be '' but it is '_callee' in the transpiled code. z.name should be '' but it is '_class2' in the transpiled code. w.name should be '' but it is '_callee2' in the transpiled code. w.name should be '' but it is '_class3' in the transpiled code. w.name should be '' but it is '_callee3' in the transpiled code.
❯ nodeWelcome to Node.js v18.10.0.Type ".help" for more information.
> let x = 0 || class { } ;undefined
> let y = 0 ||function*() { } ;undefined
> let z = 1 && class { } ;undefined
> let w = 1 &&function*() { } ;undefined
> let p = null ?? class { } ;undefined
> let r = null ??function*() { } ;undefined
> x.name''
> y.name''
> z.name''
> w.name''
> p.name''
> r.name''
Hey @p51lee! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite.
💻
How are you using Babel?
Other (Next.js, Gatsby, vue-cli, ...)
Input code
Configuration file name
No response
Configuration
No response
Current and expected behavior
Hello, I've read the comment that Babel doesn't aim at perfectly matching the spec. Just in case, I'll let you know the rest of the name property issues I found.
Also, I divided these name property issues into several cases because I think these cases are from distinct reasons.
Running the input code,
x.name
should be''
but it is'_class'
in the transpiled code.y.name
should be''
but it is'_callee'
in the transpiled code.z.name
should be''
but it is'_class2'
in the transpiled code.w.name
should be''
but it is'_callee2'
in the transpiled code.w.name
should be''
but it is'_class3'
in the transpiled code.w.name
should be''
but it is'_callee3'
in the transpiled code.Environment
Reproductions on Babel's own REPL
Possible solution
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: