swc/crates/swc_ecma_minifier/tests/fixture/issues/7749/output.js
Austaras ef8d12154d
fix(es/minifier): Abort seq inliner if a same var is defined in outer scope (#7772)
**Description:**

The algorithm here is directly copied from terser, I don't if it's correct or can be improved, but it does fix the issue.


**Related issue:**

 - Closes #7749
2023-08-09 20:01:59 +00:00

7 lines
106 B
JavaScript

let depth = 0;
blackbox(function(n) {
depth += 1;
let k = visit(n);
return depth -= 1, k;
});