summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/yield/star-in-iteration-stmt.js
blob: 4511806e2fb11f64eef4a0d3edcef9c5af733f53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// |reftest| error:SyntaxError
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-generator-function-definitions
es6id: 14.4
description: >
  YieldExpression operand may not include the `in` keyword in contexts where it
  is disallowed
info: |
  Syntax

  yield [no LineTerminator here] * AssignmentExpression[?In, +Yield]
negative:
  phase: parse
  type: SyntaxError
features: [generators]
---*/

$DONOTEVALUATE();

function* g() {
  for (yield * '' in {}; ; ) ;
}