michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: */ michael@0: michael@0: /* Don't crash. */ michael@0: try { michael@0: eval("function f(){}(((f)for(x in function(){}))())"); michael@0: var threwTypeError = false; michael@0: } catch (x) { michael@0: var threwTypeError = x instanceof TypeError; michael@0: } michael@0: assertEq(threwTypeError, true); michael@0: michael@0: /* Properly bind f. */ michael@0: assertEq(eval("function f() {}; var i = (f for (f in [1])); uneval([n for (n in i)])"), michael@0: '["0"]'); michael@0: michael@0: reportCompare(true, true);