tor-browser

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

arrowparameters-bindingidentifier-concisebody-assignmentexpression.js (519B)


      1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 es6id: 14.2
      5 description: >
      6    ArrowFunction[In, Yield] :
      7      ArrowParameters[?Yield] [no LineTerminator here] => ConciseBody[?In]
      8 
      9    LineTerminator not present
     10    ArrowParameters[Yield] : BindingIdentifier
     11    ConciseBody[In] : AssignmentExpression[?In]
     12 ---*/
     13 var af = x => x;
     14 
     15 assert.sameValue(typeof af, "function");
     16 assert.sameValue(af(1), 1);
     17 
     18 reportCompare(0, 0);