Debian Codegraph @

js/src/tests/test262/language/statements/generators/no-yield.js

raw
1 // Copyright (C) 2013 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 description: >
6 Generators declared with GeneratorDeclaration syntax do not require a
7 `yield` expression.
8 es6id: 14.4
9 features: [generators]
10 ---*/
11
12 function *foo(a) {}
13
14 var g = foo(3);
15
16 assert.sameValue(g.next().value, undefined);
17 assert.sameValue(g.next().done, true);
18
19 reportCompare(0, 0);