diff options
Diffstat (limited to 'js/src/tests/test262/language/expressions/assignment/target-string.js')
-rw-r--r-- | js/src/tests/test262/language/expressions/assignment/target-string.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/expressions/assignment/target-string.js b/js/src/tests/test262/language/expressions/assignment/target-string.js new file mode 100644 index 0000000000..891933e326 --- /dev/null +++ b/js/src/tests/test262/language/expressions/assignment/target-string.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-assignment-operators-static-semantics-early-errors +description: > + simple assignment throws SyntaxError if LeftHandSide is not a + reference (string) +info: | + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + It is an early Syntax Error if LeftHandSideExpression is neither an + ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of + LeftHandSideExpression is invalid or strict. +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +'x' = 42; |