@@ -3635,7 +3635,7 @@ merge(Compressor.prototype, {
|
|||||||
return !this.is_declared(compressor);
|
return !this.is_declared(compressor);
|
||||||
});
|
});
|
||||||
def(AST_Try, function(compressor) {
|
def(AST_Try, function(compressor) {
|
||||||
return this.bcatch ? this.bcatch.may_throw(compressor) : any(this.body, compressor)
|
return (this.bcatch ? this.bcatch.may_throw(compressor) : any(this.body, compressor))
|
||||||
|| this.bfinally && this.bfinally.may_throw(compressor);
|
|| this.bfinally && this.bfinally.may_throw(compressor);
|
||||||
});
|
});
|
||||||
def(AST_Unary, function(compressor) {
|
def(AST_Unary, function(compressor) {
|
||||||
|
|||||||
@@ -7422,3 +7422,45 @@ issue_3641: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "foo undefined"
|
expect_stdout: "foo undefined"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_3651: {
|
||||||
|
options = {
|
||||||
|
collapse_vars: true,
|
||||||
|
toplevel: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
var a, b = "PASS";
|
||||||
|
try {
|
||||||
|
a = function() {
|
||||||
|
try {
|
||||||
|
var c = 1;
|
||||||
|
while (0 < --c);
|
||||||
|
} catch (e) {} finally {
|
||||||
|
throw 42;
|
||||||
|
}
|
||||||
|
}();
|
||||||
|
b = "FAIL";
|
||||||
|
a.p;
|
||||||
|
} catch (e) {
|
||||||
|
console.log(b);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
var a, b = "PASS";
|
||||||
|
try {
|
||||||
|
a = function() {
|
||||||
|
try {
|
||||||
|
var c = 1;
|
||||||
|
while (0 < --c);
|
||||||
|
} catch (e) {} finally {
|
||||||
|
throw 42;
|
||||||
|
}
|
||||||
|
}();
|
||||||
|
b = "FAIL";
|
||||||
|
a.p;
|
||||||
|
} catch (e) {
|
||||||
|
console.log(b);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user