tor-browser

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

ident-reference-true.js (834B)


      1 // |reftest| error:SyntaxError
      2 // Copyright (C) 2017 André Bargull. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 esid: sec-identifiers-static-semantics-early-errors
      7 description: >
      8  `false` is a reserved word and cannot be used as an identifier reference.
      9 info: |
     10  Identifier : IdentifierName but not ReservedWord
     11 
     12  It is a Syntax Error if StringValue of IdentifierName is the same String
     13  value as the StringValue of any ReservedWord except for yield.
     14 negative:
     15  phase: parse
     16  type: SyntaxError
     17 ---*/
     18 
     19 $DONOTEVALUATE();
     20 
     21 // It's tempting to write `true = 0`, but that'd be a test to validate `true`
     22 // is not a valid simple assignment target, cf. tests in language/expressions/assignment.
     23 // Also see: sec-semantics-static-semantics-isvalidsimpleassignmenttarget
     24 ({true});