happens when inner function:
- just below top level
- not referenced
- `unused` is disabled
closes #1445
var s = this.scope;
while (s) {
push_uniq(s.enclosed, def);
- if (s === def.scope) break;
if (options.keep_fnames) {
- s.variables.each(function(d) {
+ s.functions.each(function(d) {
push_uniq(def.scope.enclosed, d);
});
}
+ if (s === def.scope) break;
s = s.parent_scope;
}
});
+level_zero: {
+ options = {
+ keep_fnames: true
+ }
+ mangle = {
+ keep_fnames: true
+ }
+ input: {
+ function f(x) {
+ function n(a) {
+ return a * a;
+ }
+ return function() {
+ return x;
+ };
+ }
+ }
+ expect: {
+ function f(r) {
+ function n(n) {
+ return n * n;
+ }
+ return function() {
+ return r;
+ };
+ }
+ }
+}
+
level_one: {
options = {
keep_fnames: true