@@ -1172,7 +1172,7 @@ merge(Compressor.prototype, {
|
|||||||
scope = node;
|
scope = node;
|
||||||
break;
|
break;
|
||||||
} else if (node instanceof AST_Try) {
|
} else if (node instanceof AST_Try) {
|
||||||
in_try = node;
|
if (!in_try) in_try = node;
|
||||||
}
|
}
|
||||||
} while (node = compressor.parent(level++));
|
} while (node = compressor.parent(level++));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8108,3 +8108,37 @@ issue_3908: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "PASS"
|
expect_stdout: "PASS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_3927: {
|
||||||
|
options = {
|
||||||
|
collapse_vars: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
var a = 0;
|
||||||
|
console.log(function(b) {
|
||||||
|
try {
|
||||||
|
try {
|
||||||
|
if (a + (b = "PASS", true)) return;
|
||||||
|
b.p;
|
||||||
|
} finally {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
|
}());
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
var a = 0;
|
||||||
|
console.log(function(b) {
|
||||||
|
try {
|
||||||
|
try {
|
||||||
|
if (a + (b = "PASS", true)) return;
|
||||||
|
b.p;
|
||||||
|
} finally {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
} catch (e) {}
|
||||||
|
}());
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user