Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/assignment/target-cover-id.js

raw
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-assignment-operators-static-semantics-early-errors
5 es6id: 12.14.1
6 es5id: 11.1.6_A3_T5
7 description: Applied to a "covered" IdentifierReference
8 info: |
9 AssignmentExpression : LeftHandSideExpression = AssignmentExpression
10
11 - It is an early Reference Error if LeftHandSideExpression is neither an
12 ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of
13 LeftHandSideExpression is false.
14
15 Static Semantics: IsValidSimpleAssignmentTarget
16
17 IdentifierReference : Identifier
18
19 1. If this IdentifierReference is contained in strict mode code and
20 StringValue of Identifier is "eval" or "arguments", return false.
21 2. Return true.
22 ---*/
23
24 var x;
25
26 (x) = 1;
27
28 assert.sameValue(x, 1);