Invalid flags in a RegExp literal should be an early SyntaxError
[WebKit-https.git] / JSTests / stress / generator-function-name.js
1 function shouldBe(actual, expected) {
2     if (actual !== expected)
3         throw new Error('bad value: ' + actual);
4 }
5
6 var ok = function *generator()
7 {
8     yield generator;
9 };
10
11 var g = ok();
12 shouldBe(g.next().value, ok);
13
14 function* generator2(factory)
15 {
16     shouldBe(generator2, factory);
17 };
18
19 generator2(generator2).next();