| 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-arrow-function-definitions |
| 5 |
es6id: 14.2 |
| 6 |
description: > |
| 7 |
The `yield` token is interpreted contextually outside of strict mode |
| 8 |
info: | |
| 9 |
ArrowFunction[In, Yield] : |
| 10 |
|
| 11 |
ArrowParameters[?Yield] [no LineTerminator here] => ConciseBody[?In] |
| 12 |
|
| 13 |
14.2.1 Static Semantics: Early Errors# |
| 14 |
|
| 15 |
ArrowFunction : ArrowParameters=>ConciseBody |
| 16 |
|
| 17 |
- It is a Syntax Error if ArrowParameters Contains YieldExpression is true. |
| 18 |
features: [generators, default-parameters] |
| 19 |
negative: |
| 20 |
phase: parse |
| 21 |
type: SyntaxError |
| 22 |
---*/ |
| 23 |
|
| 24 |
throw "Test262: This statement should not be evaluated."; |
| 25 |
|
| 26 |
function *g() { |
| 27 |
(x = yield) => {}; |
| 28 |
} |