js-confuser
js-confuser copied to clipboard
Control Flow Flattening breaks nested redefined function declaration
Config and Small code sample
Config:
{
target: "node",
controlFlowFlattening: true
}
Code:
if (true) {
function myFunction() {
console.log("Top Function Declaration");
}
function myFunction() {
console.log("Bottom Function Declaration");
}
}
var filler;
myFunction(); // "Bottom Function Declaration"
Expected behavior
The program should output "Bottom Function Declaration"
Actual behavior
The program outputs "Top Function Declaration"