Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/prefix-increment/target-cover-newtarget.js

raw
1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-unary-operators-static-semantics-early-errors
5 es6id: 12.5.1
6 description: Applied to a "covered" new.target
7 info: |
8 UnaryExpression :
9 ++ UnaryExpression
10 -- UnaryExpression
11
12 - It is an early Reference Error if IsValidSimpleAssignmentTarget of
13 UnaryExpression is false.
14
15 12.3.1.5 Static Semantics: IsValidSimpleAssignmentTarget
16
17 NewTarget:
18
19 new.target
20
21 1. Return false.
22 negative:
23 phase: parse
24 type: ReferenceError
25 ---*/
26
27 throw "Test262: This statement should not be evaluated.";
28
29 function f() {
30 ++(new.target);
31 }