tor-browser

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

early-errors-object-method-async-lineterminator.js (543B)


      1 // |reftest| error:SyntaxError
      2 // Copyright (C) 2017 Mozilla Corporation. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 esid: prod-AsyncMethod
      7 description: async methods cannot have a line terminator between "async" and the property name
      8 info: |
      9  14.6 Async Function Definitions
     10 
     11  AsyncMethod:
     12    async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
     13 negative:
     14  phase: parse
     15  type: SyntaxError
     16 ---*/
     17 
     18 $DONOTEVALUATE();
     19 
     20 ({
     21  async
     22  foo() { }
     23 })