@@ -6246,9 +6246,7 @@ Compressor.prototype.compress = function(node) {
|
||||
if (node instanceof AST_Try) {
|
||||
var save_try = in_try;
|
||||
in_try = node;
|
||||
var save = segment;
|
||||
walk_body(node, tw);
|
||||
segment = save;
|
||||
if (node.bcatch) {
|
||||
if (node.bcatch.argname) node.bcatch.argname.mark_symbol(function(node) {
|
||||
if (node instanceof AST_SymbolCatch) {
|
||||
@@ -6266,7 +6264,6 @@ Compressor.prototype.compress = function(node) {
|
||||
}
|
||||
}
|
||||
in_try = save_try;
|
||||
segment = save;
|
||||
if (node.bfinally) node.bfinally.walk(tw);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3702,3 +3702,33 @@ issue_5182: {
|
||||
]
|
||||
node_version: ">=4"
|
||||
}
|
||||
|
||||
issue_5420: {
|
||||
options = {
|
||||
merge_vars: true,
|
||||
toplevel: true,
|
||||
}
|
||||
input: {
|
||||
do {
|
||||
var a = "FAIL 1";
|
||||
a && a.p;
|
||||
a = "FAIL 2";
|
||||
try {
|
||||
continue;
|
||||
} catch (e) {}
|
||||
var b = "FAIL 3";
|
||||
} while (console.log(b || "PASS"));
|
||||
}
|
||||
expect: {
|
||||
do {
|
||||
var a = "FAIL 1";
|
||||
a && a.p;
|
||||
a = "FAIL 2";
|
||||
try {
|
||||
continue;
|
||||
} catch (e) {}
|
||||
var b = "FAIL 3";
|
||||
} while (console.log(b || "PASS"));
|
||||
}
|
||||
expect_stdout: "PASS"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user