tor-browser

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

ident-name-prop-name-literal-new-escaped.js (978B)


      1 // This file was procedurally generated from the following sources:
      2 // - src/identifier-names/new-escaped.case
      3 // - src/identifier-names/default/obj-prop-name.template
      4 /*---
      5 description: new is a valid identifier name, using escape (PropertyName)
      6 esid: prod-PropertyDefinition
      7 flags: [generated]
      8 info: |
      9    ObjectLiteral :
     10      { PropertyDefinitionList }
     11      { PropertyDefinitionList , }
     12 
     13    PropertyDefinitionList:
     14      PropertyDefinition
     15      PropertyDefinitionList , PropertyDefinition
     16 
     17    PropertyDefinition:
     18      IdentifierReference
     19      PropertyName : AssignmentExpression
     20      MethodDefinition
     21      ... AssignmentExpression
     22      ...
     23 
     24    PropertyName:
     25      LiteralPropertyName
     26      ...
     27 
     28    LiteralPropertyName:
     29      IdentifierName
     30      ...
     31 
     32    Reserved Words
     33 
     34    A reserved word is an IdentifierName that cannot be used as an Identifier.
     35 ---*/
     36 
     37 var obj = {
     38  n\u0065w: 42
     39 };
     40 
     41 assert.sameValue(obj['new'], 42, 'property exists');
     42 
     43 reportCompare(0, 0);