disallow parameter substitution for named IIFEs (#1596)
Self-referenced function has non-fixed values assigned to its parameters. Let `unused` & `!keep_fnames` do the scanning, then apply `reduce_vars` only to unnamed functions. fixes #1595
This commit is contained in:
@@ -279,6 +279,7 @@ merge(Compressor.prototype, {
|
||||
}
|
||||
var iife;
|
||||
if (node instanceof AST_Function
|
||||
&& !node.name
|
||||
&& (iife = tw.parent()) instanceof AST_Call
|
||||
&& iife.expression === node) {
|
||||
// Virtually turn IIFE parameters into variable definitions:
|
||||
|
||||
Reference in New Issue
Block a user