Debian Codegraph @

js/src/tests/test262/language/expressions/prefix-increment/eval-strict.js

raw
1 // |reftest| error:SyntaxError
2 'use strict';
3 // Copyright (c) 2012 Ecma International. All rights reserved.
4 // This code is governed by the BSD license found in the LICENSE file.
5
6 /*---
7 esid: sec-update-expressions
8 description: >
9 It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict. (eval)
10 info: |
11 sec-identifiers-static-semantics-assignmenttargettype
12
13 If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
14
15 sec-update-expressions-static-semantics-early-errors
16
17 UpdateExpression: ++ UnaryExpression
18
19 It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict.
20
21 flags: [onlyStrict]
22 negative:
23 phase: parse
24 type: SyntaxError
25 ---*/
26
27 $DONOTEVALUATE();
28
29 ++eval;