| 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-postfix-expressions-static-semantics-early-errors |
| 5 |
es6id: 12.4.1 |
| 6 |
description: Applied to a "covered" YieldExpression |
| 7 |
info: | |
| 8 |
PostfixExpression : |
| 9 |
LeftHandSideExpression ++ |
| 10 |
LeftHandSideExpression -- |
| 11 |
|
| 12 |
- It is an early Reference Error if IsValidSimpleAssignmentTarget of |
| 13 |
LeftHandSideExpression is false. |
| 14 |
|
| 15 |
12.15.3 Static Semantics: IsValidSimpleAssignmentTarget |
| 16 |
|
| 17 |
AssignmentExpression: |
| 18 |
YieldExpression |
| 19 |
ArrowFunction |
| 20 |
LeftHandSideExpression = AssignmentExpression |
| 21 |
LeftHandSideExpression AssignmentOperator AssignmentExpression |
| 22 |
|
| 23 |
1. Return false. |
| 24 |
features: [generators] |
| 25 |
negative: |
| 26 |
phase: parse |
| 27 |
type: ReferenceError |
| 28 |
---*/ |
| 29 |
|
| 30 |
throw "Test262: This statement should not be evaluated."; |
| 31 |
|
| 32 |
function* g() { |
| 33 |
(yield)++; |
| 34 |
} |