michael@0: // vim: set ts=8 sts=4 et sw=4 tw=99: michael@0: function f(x, y) { michael@0: x(f); michael@0: assertEq(y, "hello"); michael@0: } michael@0: michael@0: function g(x) { michael@0: assertEq(x.arguments[1], "hello"); michael@0: x.arguments[1] = "bye"; michael@0: assertEq(x.arguments[1], "hello"); michael@0: } michael@0: michael@0: function f2(x, y) { michael@0: arguments; michael@0: x(f2); michael@0: assertEq(y, "hello"); michael@0: } michael@0: michael@0: function g2(x) { michael@0: assertEq(x.arguments[1], "hello"); michael@0: x.arguments[1] = "bye"; michael@0: assertEq(x.arguments[1], "hello"); michael@0: } michael@0: michael@0: f(g, "hello"); michael@0: f2(g2, "hello"); michael@0: