@@ -4767,6 +4767,7 @@ Compressor.prototype.compress = function(node) {
|
|||||||
});
|
});
|
||||||
var scan_modified = new TreeWalker(function(node) {
|
var scan_modified = new TreeWalker(function(node) {
|
||||||
if (node instanceof AST_Assign) modified(node.left);
|
if (node instanceof AST_Assign) modified(node.left);
|
||||||
|
if (node instanceof AST_ForEnumeration) modified(node.init);
|
||||||
if (node instanceof AST_Unary && UNARY_POSTFIX[node.operator]) modified(node.expression);
|
if (node instanceof AST_Unary && UNARY_POSTFIX[node.operator]) modified(node.expression);
|
||||||
});
|
});
|
||||||
function modified(node) {
|
function modified(node) {
|
||||||
|
|||||||
@@ -3349,3 +3349,30 @@ issue_5362_2: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "true"
|
expect_stdout: "true"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_5380: {
|
||||||
|
options = {
|
||||||
|
evaluate: true,
|
||||||
|
keep_fnames: true,
|
||||||
|
reduce_vars: true,
|
||||||
|
toplevel: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
var a = function f(b) {
|
||||||
|
return function g() {
|
||||||
|
for (b in { PASS: 42 });
|
||||||
|
}(), b;
|
||||||
|
}("FAIL");
|
||||||
|
console.log(a);
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
var a = function f(b) {
|
||||||
|
return function g() {
|
||||||
|
for (b in { PASS: 42 });
|
||||||
|
}(), b;
|
||||||
|
}("FAIL");
|
||||||
|
console.log(a);
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user