1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
function f(x) { function x() {} arguments[0] = 42; return x; } assertEq(f(0), 42); function g(x) { function x() {} assertEq(arguments[0], x); } g(0); var caught = false; try { (function h(x) { function x() {} }).blah.baz; } catch (e) { caught = true; } assertEq(caught, true);