lgcl-and-assignment-operator-non-extensible-strict.js (647B)
1 'use strict'; 2 // Copyright (c) 2020 Ecma International. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 /*--- 6 esid: sec-assignment-operators-runtime-semantics-evaluation 7 description: > 8 Strict Mode - TypeError is not thrown if The LeftHandSide of a Logical 9 Assignment operator(&&=) is a reference to a non-existent property of an 10 object whose [[Extensible]] internal property is false. 11 flags: [onlyStrict] 12 features: [logical-assignment-operators] 13 14 ---*/ 15 16 var obj = {}; 17 Object.preventExtensions(obj); 18 19 obj.prop &&= 1; 20 assert.sameValue(obj.prop, undefined, "obj.prop"); 21 22 reportCompare(0, 0);