summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/postfix-decrement/eval-strict.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/language/expressions/postfix-decrement/eval-strict.js')
-rw-r--r--js/src/tests/test262/language/expressions/postfix-decrement/eval-strict.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/expressions/postfix-decrement/eval-strict.js b/js/src/tests/test262/language/expressions/postfix-decrement/eval-strict.js
new file mode 100644
index 0000000000..44d326c42c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/postfix-decrement/eval-strict.js
@@ -0,0 +1,28 @@
+// |reftest| error:SyntaxError
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-update-expressions
+description: >
+ It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict. (eval)
+info: |
+ sec-identifiers-static-semantics-assignmenttargettype
+
+ If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
+
+ sec-update-expressions-static-semantics-early-errors
+
+ UpdateExpression: LeftHandSideExpression --
+
+ It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict.
+flags: [onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+eval--;