blob: d482fe38d8482d00109ab578e14c3b5f733fba03 (
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 = 0;
assert.throws(ReferenceError, function() {
value ||= unresolved;
});
assert.sameValue(value, 0, "value");
reportCompare(0, 0);
|