@@ -1367,7 +1367,7 @@ merge(Compressor.prototype, {
|
|||||||
if (replace_all) return false;
|
if (replace_all) return false;
|
||||||
return node instanceof AST_SymbolRef
|
return node instanceof AST_SymbolRef
|
||||||
&& !node.is_declared(compressor)
|
&& !node.is_declared(compressor)
|
||||||
&& !(parent instanceof AST_Assign && parent.left === node);
|
&& !(parent instanceof AST_Assign && parent.operator == "=" && parent.left === node);
|
||||||
}
|
}
|
||||||
|
|
||||||
function in_conditional(node, parent) {
|
function in_conditional(node, parent) {
|
||||||
|
|||||||
@@ -7464,3 +7464,30 @@ issue_3651: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "PASS"
|
expect_stdout: "PASS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_3671: {
|
||||||
|
options = {
|
||||||
|
collapse_vars: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
var a = 0;
|
||||||
|
try {
|
||||||
|
a++;
|
||||||
|
A += 0;
|
||||||
|
a = 1 + a;
|
||||||
|
} catch (e) {
|
||||||
|
console.log(a);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
var a = 0;
|
||||||
|
try {
|
||||||
|
a++;
|
||||||
|
A += 0;
|
||||||
|
a = 1 + a;
|
||||||
|
} catch (e) {
|
||||||
|
console.log(a);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
expect_stdout: "1"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user