summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/for-of/arguments-3.js
blob: 7c5b0488f63b0d0b7e491cafab58e08f87486014 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// for-of can iterate strict arguments objects.

load(libdir + "iteration.js");

Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];

var s;
function test() {
    "use strict";
    for (var v of arguments)
        s += v;
}

s = '';
test();
assertEq(s, '');

s = '';
test('a', 'b');
assertEq(s, 'ab');