Debian Codegraph @

js/src/tests/test262/language/expressions/assignment/target-boolean.js

raw
1 // |reftest| error:SyntaxError
2 // Copyright (c) 2012 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-static-semantics-early-errors
7 description: >
8 simple assignment throws SyntaxError if LeftHandSide is not a
9 reference (boolean)
10 info: |
11 AssignmentExpression : LeftHandSideExpression = AssignmentExpression
12
13 It is an early Syntax Error if LeftHandSideExpression is neither an
14 ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of
15 LeftHandSideExpression is invalid or strict.
16 negative:
17 phase: parse
18 type: SyntaxError
19 ---*/
20
21 $DONOTEVALUATE();
22
23 true = 42;