@@ -3982,7 +3982,7 @@ merge(Compressor.prototype, {
|
|||||||
do {
|
do {
|
||||||
scope = compressor.parent(++level);
|
scope = compressor.parent(++level);
|
||||||
if (scope instanceof AST_SymbolRef) {
|
if (scope instanceof AST_SymbolRef) {
|
||||||
scope = scope.fixed_value();
|
if (scope.fixed_value() instanceof AST_Scope) return false;
|
||||||
} else if (scope instanceof AST_Catch) {
|
} else if (scope instanceof AST_Catch) {
|
||||||
catches[scope.argname.name] = true;
|
catches[scope.argname.name] = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1447,3 +1447,33 @@ recursive_inline: {
|
|||||||
}
|
}
|
||||||
expect: {}
|
expect: {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_2657: {
|
||||||
|
options = {
|
||||||
|
inline: true,
|
||||||
|
reduce_vars: true,
|
||||||
|
sequences: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
"use strict";
|
||||||
|
console.log(function f() {
|
||||||
|
return h;
|
||||||
|
function g(b) {
|
||||||
|
return b || b();
|
||||||
|
}
|
||||||
|
function h(a) {
|
||||||
|
g(a);
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
}()(42));
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
"use strict";
|
||||||
|
console.log(function(a) {
|
||||||
|
return b = a, b || b(), a;
|
||||||
|
var b;
|
||||||
|
}(42));
|
||||||
|
}
|
||||||
|
expect_stdout: "42"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user