Debian Codegraph @

js/src/tests/test262/language/expressions/postfix-increment/target-cover-newtarget.js

raw
1 // |reftest| error:SyntaxError
2 // Copyright (C) 2016 the V8 project authors. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 esid: sec-update-expressions-static-semantics-early-errors
6 description: Applied to a "covered" new.target
7 info: |
8 UpdateExpression :
9 LeftHandSideExpression ++
10 LeftHandSideExpression --
11
12 - It is an early Syntax Error if AssignmentTargetType of
13 LeftHandSideExpression is invalid or strict.
14
15 12.3.1.6 Static Semantics: AssignmentTargetType
16
17 NewTarget:
18
19 new.target
20
21 1. Return invalid.
22 negative:
23 phase: parse
24 type: SyntaxError
25 features: [new.target]
26 ---*/
27
28 $DONOTEVALUATE();
29
30 function f() {
31 (new.target)++;
32 }