Debian Codegraph @

js/src/tests/test262/language/expressions/logical-assignment/lgcl-or-assignment-operator-unresolved-rhs-put.js

raw
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 /*---
5 esid: sec-assignment-operators-runtime-semantics-evaluation
6 description: >
7 ReferenceError is thrown if the AssignmentExpression of a Logical
8 Assignment operator(||=) evaluates to an unresolvable reference and the
9 AssignmentExpression is evaluated.
10 features: [logical-assignment-operators]
11
12 ---*/
13
14 var value = 0;
15
16 assert.throws(ReferenceError, function() {
17 value ||= unresolved;
18 });
19 assert.sameValue(value, 0, "value");
20
21 reportCompare(0, 0);