[Bug]: Duplicated names of class and functions in its static block
Author: p51leeCreated Oct 31, 2022Updated Mar 22, 2026
Labelsbug3rd party library
Expected Behavior
This input JavaScript code
// input.js
class x { static { function x ( ) { } function x ( ) { } } }should terminate normally.
$ node --version
v18.11.0
$ node input.js
// terminates without errorCurrent Behavior
Obfuscator crashes when the input.js is given.

Note: Obfuscator works fine if there is only one function definition in the static block.
Steps to Reproduce
- I used https://obfuscator.io/ (with default settings) to make this error.
- Paste
input.js - Obfuscate
Your Environment
- Obfuscator version used: https://obfuscator.io/
- Node version used: 18.11.0
Stack trace
Minimal working example that will help to reproduce issue
Source: javascript-obfuscator/javascript-obfuscator