lgcl-and-assignment-operator-namedevaluation-class-expression.js (729B)
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: NamedEvaluation of Logical And Assignment 7 info: | 8 AssignmentExpression: 9 LeftHandSideExpression &&= AssignmentExpression 10 11 5. If IsAnonymousFunctionDefinition(AssignmentExpression) and IsIdentifierRef of LeftHandSideExpression are both true, then 12 a. Let rval be NamedEvaluation of AssignmentExpression with argument GetReferencedName(lref). 13 features: [logical-assignment-operators] 14 15 ---*/ 16 17 var value = 1; 18 value &&= class {}; 19 20 assert.sameValue(value.name, "value", "value"); 21 22 reportCompare(0, 0);