@@ -2119,7 +2119,9 @@ merge(Compressor.prototype, {
|
|||||||
}
|
}
|
||||||
arg = null;
|
arg = null;
|
||||||
}
|
}
|
||||||
if (node instanceof AST_ObjectIdentity && (fn_strict || !tw.find_parent(AST_Scope))) {
|
if (node instanceof AST_ObjectIdentity && (fn_strict
|
||||||
|
|| !tw.find_parent(AST_Scope)
|
||||||
|
|| is_arrow(arg) && iife instanceof AST_New)) {
|
||||||
arg = null;
|
arg = null;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -703,3 +703,24 @@ issue_4666: {
|
|||||||
expect_stdout: "true"
|
expect_stdout: "true"
|
||||||
node_version: ">=4"
|
node_version: ">=4"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_4685: {
|
||||||
|
options = {
|
||||||
|
collapse_vars: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
new function(f) {
|
||||||
|
if (f() !== this)
|
||||||
|
console.log("PASS");
|
||||||
|
}(() => this);
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
new function(f) {
|
||||||
|
if (f() !== this)
|
||||||
|
console.log("PASS");
|
||||||
|
}(() => this);
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
node_version: ">=4"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user