You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 1, 2025. It is now read-only.
function *fn(){
(yield 1)(yield 2)(yield 3);
}
var gen = fn();
console.log('a', gen.next());
console.log('b', gen.next());
console.log('c', gen.next());
console.log('d', gen.next());
will throw when executing d because all yields are processed before attempting to call the functions, whereas the expectation is that it would throw when processing c.
The output currently is
case 0:
context$1$0.next = 2;
return 1;
case 2:
context$1$0.next = 4;
return 2;
case 4:
context$1$0.t0 = context$1$0.sent;
context$1$0.next = 7;
return 3;
case 7:
context$1$0.t1 = context$1$0.sent;
(0, context$1$0.sent)(context$1$0.t0)(context$1$0.t1);
where really the first call should be in the earlier case.