summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/bug508178.js
blob: c779c8220053eacd4c54db8a4df2085be7e62e71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
actual = '';
expected = 'g,g,g,g,f,';

function test() {
    var testargs = arguments;
    var f = function (name, which) {
        var args = [testargs, arguments];
        return args[which][0];
    };
    var arr = [0, 0, 0, 0, 1];
    for (var i = 0; i < arr.length; i++)
        arr[i] = f("f", arr[i]);
    appendToActual(arr);
}
test('g');


assertEq(actual, expected)