summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug1700525.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/bug1700525.js')
-rw-r--r--js/src/jit-test/tests/basic/bug1700525.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/bug1700525.js b/js/src/jit-test/tests/basic/bug1700525.js
new file mode 100644
index 0000000000..80424f7e2f
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug1700525.js
@@ -0,0 +1,14 @@
+// Get a dictionary object.
+var o = {x: 1, y: 2, z: 3};
+delete o.x;
+
+// Redefine |y| as an accessor.
+var val = 0;
+Object.defineProperty(o, "y", {get: () => val, set: v => { val = v; }});
+
+// Optimized Object.assign path should fail.
+Object.assign(o, {x: 3, y: 4, z: 5});
+assertEq(val, 4);
+assertEq(o.x, 3);
+assertEq(o.y, 4);
+assertEq(o.z, 5);