summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/logical-assignment/lgcl-nullish-assignment-operator-namedevaluation-function.js
blob: f293f4c4cf1232239fa673f256345e84069b60b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright (c) 2020 Ecma International.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-assignment-operators-runtime-semantics-evaluation
description: NamedEvaluation of Logical Nullish Assignment
info: |
    AssignmentExpression:
      LeftHandSideExpression ??= AssignmentExpression

    4. If IsAnonymousFunctionDefinition(AssignmentExpression) and IsIdentifierRef of LeftHandSideExpression are both true, then
      a. Let rval be NamedEvaluation of AssignmentExpression with argument GetReferencedName(lref).
features: [logical-assignment-operators]

---*/

var value = undefined;
value ??= function() {};

assert.sameValue(value.name, "value", "value");

reportCompare(0, 0);