michael@0: // Any copyright is dedicated to the Public Domain. michael@0: // http://creativecommons.org/licenses/publicdomain/ michael@0: michael@0: var x; michael@0: try { michael@0: eval("var {if} = {'if': 1};"); michael@0: } catch (exc) { michael@0: x = exc; michael@0: } michael@0: assertEq(x instanceof SyntaxError, true); michael@0: assertEq("if" in this, false); michael@0: michael@0: x = undefined; michael@0: try { michael@0: Function("var {if} = {'if': 1};"); michael@0: } catch (exc) { michael@0: x = exc; michael@0: } michael@0: assertEq(x instanceof SyntaxError, true); michael@0: michael@0: reportCompare(0, 0, 'ok');