tor-browser

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

private-field-in-nested.js (627B)


      1 // |reftest| error:SyntaxError
      2 // Copyright (C) 2021 André Bargull. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 description: >
      7  Can't nest `in` expressions when the left-hand side is PrivateIdentifier.
      8 info: |
      9  Syntax
     10    RelationalExpression[In, Yield, Await]:
     11    [...]
     12    [+In]PrivateIdentifier in ShiftExpression[?Yield, ?Await]
     13 esid: sec-relational-operators
     14 negative:
     15  phase: parse
     16  type: SyntaxError
     17 features: [class-fields-private, class-fields-private-in]
     18 ---*/
     19 
     20 $DONOTEVALUATE();
     21 
     22 class C {
     23  #field;
     24 
     25  constructor() {
     26    #field in #field in this;
     27  }
     28 }