@@ -6905,7 +6905,7 @@ Compressor.prototype.compress = function(node) {
|
||||
initializations.add(def.id, node);
|
||||
if (tw.parent() instanceof AST_ExportDefault) {
|
||||
export_defaults[def.id] = true;
|
||||
return;
|
||||
return scan_ref_scoped(node, descend, true);
|
||||
}
|
||||
if (drop && !(def.id in lambda_ids)) lambda_ids[def.id] = 1;
|
||||
return true;
|
||||
|
||||
@@ -560,3 +560,23 @@ issue_5444: {
|
||||
export var a = console;
|
||||
}
|
||||
}
|
||||
|
||||
issue_5628: {
|
||||
options = {
|
||||
unused: true,
|
||||
}
|
||||
input: {
|
||||
var a;
|
||||
export default function f() {
|
||||
for (a in 42);
|
||||
}
|
||||
console.log(a);
|
||||
}
|
||||
expect: {
|
||||
var a;
|
||||
export default function f() {
|
||||
for (a in 42);
|
||||
}
|
||||
console.log(a);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user