| 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: > |
| 7 |
YieldExpression operand may not include the `in` keyword in contexts where it |
| 8 |
is disallowed |
| 9 |
info: | |
| 10 |
Syntax |
| 11 |
|
| 12 |
yield [no LineTerminator here] AssignmentExpression[?In, +Yield] |
| 13 |
negative: |
| 14 |
phase: parse |
| 15 |
type: SyntaxError |
| 16 |
features: [generators] |
| 17 |
---*/ |
| 18 |
|
| 19 |
throw "Test262: This statement should not be evaluated."; |
| 20 |
|
| 21 |
function* g() { |
| 22 |
for (yield '' in {}; ; ) ; |
| 23 |
} |