tor-browser

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

lgcl-nullish-assignment-operator-namedevaluation-arrow-function.js (741B)


      1 // Copyright (c) 2020 Ecma International.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: sec-assignment-operators-runtime-semantics-evaluation
      6 description: NamedEvaluation of Logical Nullish Assignment
      7 info: |
      8    AssignmentExpression:
      9      LeftHandSideExpression ??= AssignmentExpression
     10 
     11    4. If IsAnonymousFunctionDefinition(AssignmentExpression) and IsIdentifierRef of LeftHandSideExpression are both true, then
     12      a. Let rval be NamedEvaluation of AssignmentExpression with argument GetReferencedName(lref).
     13 features: [logical-assignment-operators]
     14 
     15 ---*/
     16 
     17 var value = undefined;
     18 value ??= () => {};
     19 
     20 assert.sameValue(value.name, "value", "value");
     21 
     22 reportCompare(0, 0);