@@ -933,10 +933,10 @@ merge(Compressor.prototype, {
|
|||||||
def.fixed = false;
|
def.fixed = false;
|
||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
} else if (init instanceof AST_SymbolRef && !init.is_immutable()) {
|
} else if (init instanceof AST_SymbolRef) {
|
||||||
var def = init.definition();
|
var def = init.definition();
|
||||||
def.assignments++;
|
def.assignments++;
|
||||||
def.fixed = false;
|
if (!init.is_immutable()) def.fixed = false;
|
||||||
}
|
}
|
||||||
this.body.walk(tw);
|
this.body.walk(tw);
|
||||||
pop(tw);
|
pop(tw);
|
||||||
|
|||||||
@@ -5134,8 +5134,8 @@ issue_4259: {
|
|||||||
console.log(typeof a);
|
console.log(typeof a);
|
||||||
}
|
}
|
||||||
expect: {
|
expect: {
|
||||||
function a() {
|
var a = function b() {
|
||||||
for (a in a);
|
for (b in b);
|
||||||
}
|
}
|
||||||
a();
|
a();
|
||||||
console.log(typeof a);
|
console.log(typeof a);
|
||||||
@@ -5225,3 +5225,27 @@ trailing_comma: {
|
|||||||
expect_exact: 'new function(a,b){console.log(b,a)}(42,"PASS");'
|
expect_exact: 'new function(a,b){console.log(b,a)}(42,"PASS");'
|
||||||
expect_stdout: "PASS 42"
|
expect_stdout: "PASS 42"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_4451: {
|
||||||
|
options = {
|
||||||
|
functions: true,
|
||||||
|
reduce_vars: true,
|
||||||
|
toplevel: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
var a = function f() {
|
||||||
|
for (f in "foo")
|
||||||
|
return f;
|
||||||
|
};
|
||||||
|
while (console.log(typeof a()));
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
var a = function f() {
|
||||||
|
for (f in "foo")
|
||||||
|
return f;
|
||||||
|
};
|
||||||
|
while (console.log(typeof a()));
|
||||||
|
}
|
||||||
|
expect_stdout: "function"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user