BackwardsGraph needs to consider back edges as the backward's root successor
[WebKit-https.git] / JSTests / es6 / generators_%GeneratorPrototype%.throw.js
1 function test() {
2
3 var passed = false;
4 function * generator(){
5   try {
6     yield 5; yield 6;
7   } catch(e) {
8     passed = (e === "foo");
9   }
10 };
11 var iterator = generator();
12 iterator.next();
13 iterator.throw("foo");
14 return passed;
15       
16 }
17
18 if (!test())
19     throw new Error("Test failed");
20