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

Wrong return value #255

Closed
djelas opened this issue Aug 8, 2016 · 1 comment
Closed

Wrong return value #255

djelas opened this issue Aug 8, 2016 · 1 comment

Comments

@djelas
Copy link

djelas commented Aug 8, 2016

The following code does not execute as expected:

function *example() {
  var value = 0;
  try {
    value = yield;
    value = yield;
  }
  finally {
    return value;
  }
}

var gen = example();
gen.next();
gen.next(1);

var returnValue = gen.return();
console.log("Returned: " + returnValue);

The returned value should be equal to 1, instead undefined is returned

@benjamn
Copy link
Collaborator

benjamn commented Nov 30, 2016

Sorry for the delay. I've been waiting until #259 was merged to address pending issues on this repository.

Would you have time to submit a failing test case here?

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