-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
Spec: Brand Check for Private FieldsoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
💻
- Would you like to work on a fix?
How are you using Babel?
Other (Next.js, Gatsby, vue-cli, ...)
Input code
class C { static #x = #x in 0 } ;Configuration file name
No response
Configuration
No response
Current and expected behavior
The input program is expected to throw TypeError but the transpiled program terminates without any error.
❯ node
Welcome to Node.js v18.10.0.
Type ".help" for more information.
> class C { static #x = #x in 0 } ;
Uncaught TypeError: Cannot use 'in' operator to search for '#x' in 0
at <static_initializer> (REPL1:1:26)Environment
Reproductions on Babel's own REPL
Possible solution
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
Spec: Brand Check for Private FieldsoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue