tor-browser

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

fields-duplicate-privatenames.js (596B)


      1 // |reftest| error:SyntaxError
      2 // Copyright 2017 Valerie Young.  All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 description: Syntax error if the same private field defined twice
      7 esid: sec-class-definitions-static-semantics-early-errors
      8 features: [class, class-fields-private]
      9 negative:
     10  phase: parse
     11  type: SyntaxError
     12 info: |
     13  Static Semantics: Early Errors
     14 
     15    ClassBody : ClassElementList
     16    It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries.
     17 ---*/
     18 
     19 
     20 $DONOTEVALUATE();
     21 
     22 var C = class {
     23  #x;
     24  #x;
     25 }