parent
bbed9b13b1
commit
a7698f8845
|
|
@ -1143,7 +1143,7 @@ merge(Compressor.prototype, {
|
|||
var parent = tw.parent();
|
||||
if (parent instanceof AST_ExportDeclaration || parent instanceof AST_ExportDefault) def.single_use = false;
|
||||
if (tw.defun_visited[def.id]) return true;
|
||||
if (tw.defun_ids[def.id] !== tw.safe_ids) return true;
|
||||
if (def.init === fn && tw.defun_ids[def.id] !== tw.safe_ids) return true;
|
||||
tw.defun_visited[def.id] = true;
|
||||
fn.inlined = false;
|
||||
push(tw);
|
||||
|
|
|
|||
|
|
@ -7631,3 +7631,34 @@ issue_4568: {
|
|||
}
|
||||
expect_stdout: "PASS"
|
||||
}
|
||||
|
||||
issue_4937: {
|
||||
options = {
|
||||
reduce_vars: true,
|
||||
toplevel: true,
|
||||
unused: true,
|
||||
}
|
||||
input: {
|
||||
function f() {
|
||||
while (console.log("PASS"));
|
||||
}
|
||||
do {
|
||||
function g() {
|
||||
f();
|
||||
}
|
||||
} while (!g);
|
||||
f();
|
||||
}
|
||||
expect: {
|
||||
function f() {
|
||||
while (console.log("PASS"));
|
||||
}
|
||||
do {
|
||||
function g() {
|
||||
f();
|
||||
}
|
||||
} while (!g);
|
||||
f();
|
||||
}
|
||||
expect_stdout: "PASS"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user