summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug1700525.js
blob: 80424f7e2fba9a11c047d7e952f4729c6401f4f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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);