tor-browser

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

private-field-invalid-rhs.js (621B)


      1 // |reftest| error:SyntaxError
      2 // Copyright 2021 the V8 project authors.  All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 description: Syntactic grammar restricts right-hand side
      7 info: |
      8  Syntax
      9    RelationalExpression[In, Yield, Await]:
     10    [...]
     11    [+In]PrivateIdentifier in ShiftExpression[?Yield, ?Await]
     12 esid: sec-relational-operators-runtime-semantics-evaluation
     13 negative:
     14  phase: parse
     15  type: SyntaxError
     16 features: [class-fields-private, class-fields-private-in]
     17 ---*/
     18 
     19 $DONOTEVALUATE();
     20 
     21 class C {
     22  #field;
     23 
     24  constructor() {
     25    #field in () => {};
     26  }
     27 }