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

load(libdir + "iteration.js");

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

var s;
function g(obj) {
    for (var v of obj)
        s += v;
}

function f() {
    g(arguments);
}

s = '';
f(1, 2, 3);
assertEq(s, '123');