@@ -1483,6 +1483,7 @@ merge(Compressor.prototype, {
|
|||||||
function is_lhs_read_only(lhs, compressor) {
|
function is_lhs_read_only(lhs, compressor) {
|
||||||
if (lhs instanceof AST_ObjectIdentity) return true;
|
if (lhs instanceof AST_ObjectIdentity) return true;
|
||||||
if (lhs instanceof AST_PropAccess) {
|
if (lhs instanceof AST_PropAccess) {
|
||||||
|
if (lhs.property == "__proto__") return true;
|
||||||
lhs = lhs.expression;
|
lhs = lhs.expression;
|
||||||
if (lhs instanceof AST_SymbolRef) {
|
if (lhs instanceof AST_SymbolRef) {
|
||||||
if (lhs.is_immutable()) return false;
|
if (lhs.is_immutable()) return false;
|
||||||
|
|||||||
@@ -9151,3 +9151,23 @@ issue_4910: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "bar foo"
|
expect_stdout: "bar foo"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_4914: {
|
||||||
|
options = {
|
||||||
|
collapse_vars: true,
|
||||||
|
pure_getters: "strict",
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
console.log(typeof function f() {
|
||||||
|
f.__proto__ = 42;
|
||||||
|
return f.__proto__;
|
||||||
|
}());
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
console.log(typeof function f() {
|
||||||
|
f.__proto__ = 42;
|
||||||
|
return f.__proto__;
|
||||||
|
}());
|
||||||
|
}
|
||||||
|
expect_stdout: "function"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user