1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/tests/js1_8_5/regress/regress-810525.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,25 @@ 1.4 +/* 1.5 + * Any copyright is dedicated to the Public Domain. 1.6 + * http://creativecommons.org/licenses/publicdomain/ 1.7 + */ 1.8 +var expect = ''; 1.9 +var actual = ''; 1.10 + 1.11 +function test(s) { 1.12 + var threw = false; 1.13 + try { 1.14 + eval(s); 1.15 + } catch (e) { 1.16 + assertEq(e.message.indexOf('(intermediate value)'), -1); 1.17 + threw = true; 1.18 + } finally { 1.19 + assertEq(threw, true); 1.20 + } 1.21 +} 1.22 + 1.23 +test("({p:1, q:2}).m()"); 1.24 +test("[].m()"); 1.25 +test("[1,2,3].m()"); 1.26 +test("/hi/.m()"); 1.27 + 1.28 +reportCompare(0, 0, "ok");