@@ -1016,6 +1016,7 @@ Compressor.prototype.compress = function(node) {
|
||||
}
|
||||
|
||||
function walk_prop(lhs) {
|
||||
reset_flags(lhs);
|
||||
if (lhs instanceof AST_Dot) {
|
||||
walk_prop(lhs.expression);
|
||||
} else if (lhs instanceof AST_Sub) {
|
||||
|
||||
@@ -7896,3 +7896,33 @@ issue_5434: {
|
||||
}
|
||||
expect_stdout: "PASS"
|
||||
}
|
||||
|
||||
issue_5623: {
|
||||
options = {
|
||||
collapse_vars: true,
|
||||
evaluate: true,
|
||||
passes: 2,
|
||||
reduce_vars: true,
|
||||
side_effects: true,
|
||||
toplevel: true,
|
||||
}
|
||||
input: {
|
||||
var a = 0;
|
||||
function f() {
|
||||
var b = a;
|
||||
a = b;
|
||||
}
|
||||
f && f((a++ && a).toString());
|
||||
console.log(a);
|
||||
}
|
||||
expect: {
|
||||
var a = 0;
|
||||
function f() {
|
||||
var b;
|
||||
a = a;
|
||||
}
|
||||
f((a++ && a).toString());
|
||||
console.log(a);
|
||||
}
|
||||
expect_stdout: "1"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user