michael@0: function testGeneratorDeepBail() { michael@0: function g() { yield 2; } michael@0: var iterables = [[1], [], [], [], g()]; michael@0: michael@0: var total = 0; michael@0: for (let i = 0; i < iterables.length; i++) michael@0: for each (let j in iterables[i]) michael@0: total += j; michael@0: return total; michael@0: } michael@0: assertEq(testGeneratorDeepBail(), 3);