tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

target-cover-id.js (840B)


      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-postfix-expressions-static-semantics-early-errors
      5 es6id: 12.4.1
      6 es5id: 11.1.6_A3_T5
      7 description: Applied to a "covered" IdentifierReference
      8 info: |
      9  PostfixExpression :
     10    LeftHandSideExpression ++
     11    LeftHandSideExpression --
     12 
     13  - It is an early Reference Error if IsValidSimpleAssignmentTarget of
     14    LeftHandSideExpression 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 assert.sameValue(y, 2);
     29 
     30 ((y))++;
     31 assert.sameValue(y, 3);
     32 
     33 reportCompare(0, 0);