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

Async generator instances should directly extend %AsyncGeneratorPrototype%, not %AsyncIteratorPrototype% #270

Open
dead-claudia opened this issue Dec 24, 2016 · 2 comments

Comments

@dead-claudia
Copy link

As in, the following should hold when transpiled:

var runtime = require("regenerator-runtime")

async function *foo() {}

var fooPrototype = foo.prototype
var asyncGeneratorPrototype = Object.getPrototypeOf(fooPrototype)
var asyncIteratorPrototype = Object.getPrototypeOf(asyncGeneratorPrototype)

assert.equal(asyncGeneratorPrototype, runtime.AsyncIterator.prototype)

See sections 2.3.10 and 6.4.1 in the proposal.

@dead-claudia dead-claudia changed the title Async generator instances should extend %AsyncGeneratorPrototype%, not %AsyncIteratorPrototype% Async generator instances should directly extend %AsyncGeneratorPrototype%, not %AsyncIteratorPrototype% Dec 24, 2016
@benjamn
Copy link
Collaborator

benjamn commented Feb 17, 2017

Might you have time to submit a pull request for this? I suspect it will be analogous to #264.

@dead-claudia
Copy link
Author

I've got other things on my plate, and I don't hardly use async iterators ATM, either.

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

No branches or pull requests

2 participants