tor-browser

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

early-errors-expression-label-name-yield.js (710B)


      1 // |reftest| error:SyntaxError
      2 // Copyright 2017 the V8 project authors. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 author: Caitlin Potter <caitp@igalia.com>
      7 esid: sec-identifiers-static-semantics-early-errors
      8 description: >
      9  `yield` is a reserved keyword within async generator function bodies and may
     10  not be used as a label.
     11 info: |
     12  BindingIdentifier : Identifier
     13  LabelIdentifier : Identifier
     14 
     15    It is a Syntax Error if this production has an [Await] parameter and
     16    StringValue of Identifier is "await".
     17 negative:
     18  phase: parse
     19  type: SyntaxError
     20 features: [async-iteration]
     21 ---*/
     22 
     23 $DONOTEVALUATE();
     24 
     25 (async function*() {
     26  yield: 1;
     27 });