aboutsummaryrefslogtreecommitdiff
path: root/test/compress/properties.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/properties.js')
-rw-r--r--test/compress/properties.js58
1 files changed, 58 insertions, 0 deletions
diff --git a/test/compress/properties.js b/test/compress/properties.js
index 419c7f85..ec99c090 100644
--- a/test/compress/properties.js
+++ b/test/compress/properties.js
@@ -1640,3 +1640,61 @@ issue_2893_2: {
}
expect_stdout: "PASS"
}
+
+issue_869_1: {
+ mangle = {
+ properties: {
+ reserved: [ "get" ]
+ },
+ }
+ input: {
+ var o = { p: "FAIL" };
+ Object.defineProperty(o, "p", {
+ get: function() {
+ return "PASS";
+ }
+ });
+ console.log(o.p);
+ }
+ expect: {
+ var o = { o: "FAIL" };
+ Object.defineProperty(o, "o", {
+ get: function() {
+ return "PASS";
+ }
+ });
+ console.log(o.o);
+ }
+ expect_stdout: "PASS"
+}
+
+issue_869_2: {
+ mangle = {
+ properties: {
+ reserved: [ "get" ]
+ },
+ }
+ input: {
+ var o = { p: "FAIL" };
+ Object.defineProperties(o, {
+ p: {
+ get: function() {
+ return "PASS";
+ }
+ }
+ });
+ console.log(o.p);
+ }
+ expect: {
+ var o = { o: "FAIL" };
+ Object.defineProperties(o, {
+ o: {
+ get: function() {
+ return "PASS";
+ }
+ }
+ });
+ console.log(o.o);
+ }
+ expect_stdout: "PASS"
+}