swc/crates/swc_ecma_minifier/tests/fixture/issues/7749/input.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

11 lines
112 B
JavaScript

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