diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/testAssignmentThatIgnoresSetterRetval.js')
-rw-r--r-- | js/src/jit-test/tests/basic/testAssignmentThatIgnoresSetterRetval.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testAssignmentThatIgnoresSetterRetval.js b/js/src/jit-test/tests/basic/testAssignmentThatIgnoresSetterRetval.js new file mode 100644 index 0000000000..1c59113482 --- /dev/null +++ b/js/src/jit-test/tests/basic/testAssignmentThatIgnoresSetterRetval.js @@ -0,0 +1,10 @@ +var o = { + set x(v) { + return 42; + } +}; + +for (var i = 0; i < 10; ++i) { + var z = o.x = "choose me"; + assertEq(z, "choose me"); +} |