}
if (prop instanceof AST_Node) break;
prop = "" + prop;
- var diff = compressor.has_directive("use strict") ? function(node) {
+ var diff = prop == "__proto__" || compressor.has_directive("use strict") ? function(node) {
return node.key != prop && node.key.name != prop;
} : function(node) {
return node.key.name != prop;
}
expect_stdout: "undefined"
}
+
+issue_3916: {
+ options = {
+ join_vars: true,
+ }
+ input: {
+ var o = {};
+ o.p = "PASS";
+ o.__proto__ = 42;
+ o.q = "FAIL";
+ o.__proto__ = {
+ p: "FAIL",
+ q: "PASS",
+ };
+ o.__proto__ = "foo";
+ console.log(typeof o.__proto__, o.p, delete o.q, o.q);
+ }
+ expect: {
+ var o = {
+ p: "PASS",
+ __proto__: 42,
+ q: "FAIL",
+ };
+ o.__proto__ = {
+ p: "FAIL",
+ q: "PASS",
+ };
+ o.__proto__ = "foo";
+ console.log(typeof o.__proto__, o.p, delete o.q, o.q);
+ }
+ expect_stdout: "object PASS true PASS"
+}