summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/builtinLocals.js
blob: 032b801d00a0af384e1325fe8d86492ea8b1b21a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* Resolve 'arguments' and the name of the function itself in the presence of such local variables. */

function f() {
    return typeof arguments;
    function arguments() {
        return 7;
    }
}
assertEq(f(), "function");

function g() {
    var arguments = 0;
    return typeof arguments;
}
assertEq(g(), "number");

function h() {
    return typeof h;
    function h() {
        return 7;
    }
}
assertEq(h(), "function");

function i() {
    return typeof i;
    var i;
}
assertEq(i(), "undefined");

function j() {
    return typeof j;
}
assertEq(j(), "function");