lgcl-nullish-assignment-operator-unresolved-lhs.js 493 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 thrown if the LeftHandSideExpression of a Logical
  7. Assignment operator(??=) evaluates to an unresolvable reference
  8. flags: [onlyStrict]
  9. features: [logical-assignment-operators]
  10. ---*/
  11. assert.throws(ReferenceError, function() {
  12. unresolved ??= 1;
  13. });