diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/spread-call-rest-lookup.js')
-rw-r--r-- | js/src/jit-test/tests/basic/spread-call-rest-lookup.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/spread-call-rest-lookup.js b/js/src/jit-test/tests/basic/spread-call-rest-lookup.js new file mode 100644 index 0000000000..d57d65e48b --- /dev/null +++ b/js/src/jit-test/tests/basic/spread-call-rest-lookup.js @@ -0,0 +1,14 @@ +var count = 0; +var scope = { + get args() { + count++; + return ""; + } +}; + +with (scope) { + [].push(...args); +} + +// Ensure |args| is only looked up once. +assertEq(count, 1); |