Debian Codegraph @

js/src/tests/test262/language/expressions/prefix-increment/target-cover-yieldexpr.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" YieldExpression
7 info: |
8 UnaryExpression :
9 ++ UnaryExpression
10 -- UnaryExpression
11
12 - It is an early Syntax Error if IsValidSimpleAssignmentTarget of
13 UnaryExpression is invalid or strict.
14
15 12.15.3 Static Semantics: AssignmentTargetType
16
17 AssignmentExpression:
18 YieldExpression
19 ArrowFunction
20 AsyncArrowFunction
21 LeftHandSideExpression = AssignmentExpression
22 LeftHandSideExpression AssignmentOperator AssignmentExpression
23
24 1. Return invalid.
25 features: [generators]
26 negative:
27 phase: parse
28 type: SyntaxError
29 ---*/
30
31 $DONOTEVALUATE();
32
33 function* g() {
34 ++(yield);
35 }