tor-browser

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

private-name-early-error-async-gen-inside-class.js (716B)


      1 // |reftest| error:SyntaxError
      2 // Copyright (C) 2018 Leo Balter. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 esid: sec-method-definitions-static-semantics-early-errors
      7 description: >
      8  Throws an early SyntaxError if a method definition has a private name even
      9  inside a class body. (async generator)
     10 info: |
     11  Static Semantics: Early Errors
     12 
     13  PropertyDefinition : MethodDefinition
     14    It is a Syntax Error if PrivateBoundNames of MethodDefinition is non-empty.
     15 negative:
     16  phase: parse
     17  type: SyntaxError
     18 features: [class-methods-private, async-iteration, class, class-fields-public]
     19 ---*/
     20 
     21 $DONOTEVALUATE();
     22 
     23 class C {
     24  field = {
     25    async * #m() {}
     26  }
     27 }