builtinLocals.js (577B)
1 /* Resolve 'arguments' and the name of the function itself in the presence of such local variables. */ 2 3 function f() { 4 return typeof arguments; 5 function arguments() { 6 return 7; 7 } 8 } 9 assertEq(f(), "function"); 10 11 function g() { 12 var arguments = 0; 13 return typeof arguments; 14 } 15 assertEq(g(), "number"); 16 17 function h() { 18 return typeof h; 19 function h() { 20 return 7; 21 } 22 } 23 assertEq(h(), "function"); 24 25 function i() { 26 return typeof i; 27 var i; 28 } 29 assertEq(i(), "undefined"); 30 31 function j() { 32 return typeof j; 33 } 34 assertEq(j(), "function");