| // Copyright 2022 Igalia S.L. All rights reserved. | |
| // This code is governed by the BSD license found in the LICENSE file. | |
| /*--- | |
| templates: | |
| - default/data-property.template | |
| - default/data-property-short-circuit.template | |
| - default/getter-setter.template | |
| - default/getter-setter-short-circuit.template | |
| - default/getter.template | |
| - default/getter-short-circuit.template | |
| - default/method-short-circuit.template | |
| desc: Nullish-coalescing assignment with target being a private reference | |
| info: | | |
| sec-assignment-operators-runtime-semantics-evaluation | |
| AssignmentExpression : LeftHandSideExpression ??= AssignmentExpression | |
| 1. Let _lref_ be the result of evaluating |LeftHandSideExpression|. | |
| 2. Let _lval_ be ? GetValue(_lref_). | |
| 3. If _lval_ is neither *undefined* nor *null*, return _lval_. | |
| ... | |
| 6. Perform ? PutValue(_lref_, _rval_). | |
| 7. Return _rval_. | |
| ---*/ | |
| //- lhs | |
| null | |
| //- operator | |
| ??= | |
| //- rhs | |
| 1 | |
| //- result | |
| 1 | |
| //- short-circuit-lhs | |
| 1 |