| 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-generator-function-definitions |
| 5 |
es6id: 14.4 |
| 6 |
description: A YieldExpression is not a valid LeftHandSideExpression |
| 7 |
info: | |
| 8 |
AssignmentExpression[In, Yield] : |
| 9 |
ConditionalExpression[?In, ?Yield] |
| 10 |
[+Yield]YieldExpression[?In] |
| 11 |
ArrowFunction[?In, ?Yield] |
| 12 |
LeftHandSideExpression[?Yield] = AssignmentExpression[?In, ?Yield] |
| 13 |
LeftHandSideExpression[?Yield] AssignmentOperator AssignmentExpression[?In, ?Yield] |
| 14 |
|
| 15 |
LeftHandSideExpression[Yield] : |
| 16 |
NewExpression[?Yield] |
| 17 |
CallExpression[?Yield] |
| 18 |
features: [generators] |
| 19 |
negative: |
| 20 |
phase: parse |
| 21 |
type: SyntaxError |
| 22 |
---*/ |
| 23 |
|
| 24 |
throw "Test262: This statement should not be evaluated."; |
| 25 |
|
| 26 |
function* g() { |
| 27 |
yield = 1; |
| 28 |
} |