lgcl-nullish-assignment-operator-unresolved-rhs.js 527 B

12345678910111213141516
  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. esid: sec-assignment-operators-runtime-semantics-evaluation
  5. description: >
  6. ReferenceError is not thrown if the AssignmentExpression of a Logical
  7. Assignment operator(??=) evaluates to an unresolvable reference and the
  8. AssignmentExpression is not evaluated.
  9. features: [logical-assignment-operators]
  10. ---*/
  11. var value = 0;
  12. assert.sameValue(value ??= unresolved, 0, "value");