1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/tests/js1_8_5/regress/regress-694306.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,21 @@ 1.4 +// Any copyright is dedicated to the Public Domain. 1.5 +// http://creativecommons.org/licenses/publicdomain/ 1.6 + 1.7 +var x; 1.8 +try { 1.9 + eval("var {if} = {'if': 1};"); 1.10 +} catch (exc) { 1.11 + x = exc; 1.12 +} 1.13 +assertEq(x instanceof SyntaxError, true); 1.14 +assertEq("if" in this, false); 1.15 + 1.16 +x = undefined; 1.17 +try { 1.18 + Function("var {if} = {'if': 1};"); 1.19 +} catch (exc) { 1.20 + x = exc; 1.21 +} 1.22 +assertEq(x instanceof SyntaxError, true); 1.23 + 1.24 +reportCompare(0, 0, 'ok');