@@ -5074,6 +5074,9 @@ merge(Compressor.prototype, {
|
||||
&& right.properties.length > 0
|
||||
&& all(right.properties, function(prop) {
|
||||
return prop instanceof AST_ObjectKeyVal;
|
||||
})
|
||||
&& all(def.references, function(ref) {
|
||||
return ref.fixed_value() === right;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -972,3 +972,26 @@ issue_3871: {
|
||||
}
|
||||
expect_stdout: "PASS"
|
||||
}
|
||||
|
||||
issue_3945: {
|
||||
options = {
|
||||
hoist_props: true,
|
||||
reduce_vars: true,
|
||||
}
|
||||
input: {
|
||||
function f() {
|
||||
o.p;
|
||||
var o = {
|
||||
q: 0,
|
||||
};
|
||||
}
|
||||
}
|
||||
expect: {
|
||||
function f() {
|
||||
o.p;
|
||||
var o = {
|
||||
q: 0,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user