S11.13.1_A4_T2.js (581B)
1 // Copyright 2009 the Sputnik authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 info: "AssignmentExpression : LeftHandSideExpression = AssignmentExpression" 6 es5id: 11.13.1_A4_T2 7 description: Syntax check if "x = x" throws ReferenceError 8 ---*/ 9 10 //CHECK#1 11 try { 12 x = x; 13 throw new Test262Error('#1.1: x = x throw ReferenceError. Actual: ' + (x = x)); 14 } catch(e) { 15 if ((e instanceof ReferenceError) !== true) { 16 throw new Test262Error('#1.2: x = x throw ReferenceError. Actual: ' + (e)); 17 } 18 } 19 20 reportCompare(0, 0);