| 1 |
// Copyright (c) 2012 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-static-semantics-early-errors |
| 6 |
es5id: 11.13.1-1-2 |
| 7 |
description: > |
| 8 |
simple assignment throws ReferenceError if LeftHandSide is not a |
| 9 |
reference (string) |
| 10 |
info: | |
| 11 |
AssignmentExpression : LeftHandSideExpression = AssignmentExpression |
| 12 |
|
| 13 |
It is an early Reference Error if LeftHandSideExpression is neither an |
| 14 |
ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of |
| 15 |
LeftHandSideExpression is false. |
| 16 |
negative: |
| 17 |
phase: parse |
| 18 |
type: ReferenceError |
| 19 |
---*/ |
| 20 |
|
| 21 |
throw "Test262: This statement should not be evaluated."; |
| 22 |
|
| 23 |
'x' = 42; |