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

composition during return? #5

Open
bmeck opened this issue May 26, 2015 · 0 comments
Open

composition during return? #5

bmeck opened this issue May 26, 2015 · 0 comments

Comments

@bmeck
Copy link

bmeck commented May 26, 2015

If this is a syntactic sugar for generators consider the following:

function* g() {
  try {
    yield todo();
  }
  finally {
    yield cleanup();
  };
}
let o = g();
o.next();
o.return();

According to https://code.google.com/p/v8/issues/detail?id=3133 cleanup() should not yield. For some reason this sounds wrong to me, but looks true to spec.

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

1 participant