[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

javascript
// input.js
class x { static { function x ( ) { } function x ( ) { } } }

should terminate normally.

bash
$ node --version
v18.11.0
$ node input.js
// terminates without error

Current Behavior

Obfuscator crashes when the input.js is given. image

Note: Obfuscator works fine if there is only one function definition in the static block.

Steps to Reproduce

  1. I used https://obfuscator.io/ (with default settings) to make this error.
  2. Paste input.js
  3. Obfuscate

Your Environment

Stack trace

Minimal working example that will help to reproduce issue

Source: javascript-obfuscator/javascript-obfuscator