@@ -3568,6 +3568,7 @@ merge(Compressor.prototype, {
|
|||||||
escaped[0].walk(new TreeWalker(function(node) {
|
escaped[0].walk(new TreeWalker(function(node) {
|
||||||
if (found) return true;
|
if (found) return true;
|
||||||
if (node === ref) return found = true;
|
if (node === ref) return found = true;
|
||||||
|
if (node instanceof AST_Scope) return true;
|
||||||
}));
|
}));
|
||||||
return found;
|
return found;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -2869,3 +2869,28 @@ issue_4035: {
|
|||||||
"true",
|
"true",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_4067: {
|
||||||
|
options = {
|
||||||
|
evaluate: true,
|
||||||
|
reduce_vars: true,
|
||||||
|
unsafe: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
(function(a) {
|
||||||
|
(function(b) {
|
||||||
|
b[0] += 0;
|
||||||
|
console.log(+a);
|
||||||
|
})(a);
|
||||||
|
})([]);
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
(function(a) {
|
||||||
|
(function(b) {
|
||||||
|
b[0] += 0;
|
||||||
|
console.log(+a);
|
||||||
|
})(a);
|
||||||
|
})([]);
|
||||||
|
}
|
||||||
|
expect_stdout: "NaN"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user