target-cover-id.js (780B)
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 esid: sec-unary-operators-static-semantics-early-errors 5 es6id: 12.5.1 6 es5id: 11.1.6_A3_T5 7 description: Applied to a "covered" IdentifierReference 8 info: | 9 UnaryExpression : 10 ++ UnaryExpression 11 -- UnaryExpression 12 13 - It is an early Reference Error if IsValidSimpleAssignmentTarget of 14 UnaryExpression is false. 15 16 Static Semantics: IsValidSimpleAssignmentTarget 17 18 IdentifierReference : Identifier 19 20 1. If this IdentifierReference is contained in strict mode code and 21 StringValue of Identifier is "eval" or "arguments", return false. 22 2. Return true. 23 ---*/ 24 25 var y = 1; 26 27 ++(y); 28 29 assert.sameValue(y, 2); 30 31 reportCompare(0, 0);