diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/basic/builtinLocals.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/basic/builtinLocals.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,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");