summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/spread-call-rest-lookup.js
blob: d57d65e48b46c68f87f41ba5eb04880463d33339 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var count = 0;
var scope = {
  get args() {
    count++;
    return "";
  }
};

with (scope) {
  [].push(...args);
}

// Ensure |args| is only looked up once.
assertEq(count, 1);