summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/logical-assignment/lgcl-and-assignment-operator-unresolved-rhs-put.js
blob: d298e9324ad2964bf4112fd1d40fe0c6d1ba271c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// 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: >
    ReferenceError is thrown if the AssignmentExpression of a Logical
    Assignment operator(&&=) evaluates to an unresolvable reference and the
    AssignmentExpression is evaluated.
features: [logical-assignment-operators]

---*/

var value = 2;

assert.throws(ReferenceError, function() {
  value &&= unresolved;
});
assert.sameValue(value, 2, "value");

reportCompare(0, 0);