💻
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
💻
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
The input program is expected to throw
TypeErrorbut the transpiled program terminates without any error.Environment
Reproductions on Babel's own REPL
Possible solution
No response
Additional context
No response