Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrapped iterator's "throw" #174

Closed
mhofman opened this issue Jan 30, 2022 · 1 comment · Fixed by #194
Closed

Wrapped iterator's "throw" #174

mhofman opened this issue Jan 30, 2022 · 1 comment · Fixed by #194

Comments

@mhofman
Copy link
Member

mhofman commented Jan 30, 2022

Since (async) iterator wrapper object unconditionally have a "throw", they need to handle the case of the wrapped iterator lacking a "throw" method. yield * goes to some length to fallback to closing the iterator before throwing a type error. The existing sync to async iterator wrapper is surprisingly not following the same behavior, but consensus was reached at the last plenary on my PR to fix it: tc39/ecma262#2600

@bakkot
Copy link
Collaborator

bakkot commented Jul 7, 2022

As of #194 iterator wrapper objects no longer have throw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants