blob: 9f730eead5c00011e384a2975e077352b28273b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
'use strict';
// 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: >
Strict Mode - TypeError is not thrown if the LeftHandSide of a Logical
Assignment operator(&&=) is a reference to a data property with the
attribute value {[[Set]]:undefined} and PutValue step is not reached.
flags: [onlyStrict]
features: [logical-assignment-operators]
---*/
var obj = {};
Object.defineProperty(obj, "prop", {
get: function() {
return 0;
},
set: undefined,
enumerable: true,
configurable: true
});
assert.sameValue(obj.prop &&= 1, 0, "obj.prop");
reportCompare(0, 0);
|