-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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 function error: TypeError: Generator is already running #9372
Comments
Tried your code. It works fine for me on Chrome: 51.0.2704.106 v :) |
Same issue appears here: https://phiresky.github.io/qalc-react/ for me, which worked some time ago. |
This is a Chrome (edit: that is, V8) bug (testing on dev version v53). "use strict";
function count() { return 42; }
var generator = function* () { return count(); }
var g = generator.apply(undefined, undefined);
console.log(g.next()); incorrectly logs Inlining the result of "use strict";
function count() { return 42; }
var generator = function* () { return 42; }
var g = generator.apply(undefined, undefined);
console.log(g.next()); correctly logs The former is the bug. In the original emit, |
Please log this in the V8 issue tracker. We don't have any way to account for broken runtimes. |
Okay, I apparently had the |
Is there a tracking bug for this? This is now affecting Canary, even without the harmony flag. |
I didn't find an existing bug, so I've created https://bugs.chromium.org/p/v8/issues/detail?id=5322 |
TypeScript Version: Version 1.8.10 and Version 1.9.0-dev.20160626-1.0
Chromium Version: Version 51.0.2704.103 (64-bit)
Code
html:
Expected behavior: print 42
Actual behavior:
Emitted Javascript (ES6):
Same code works fine in node v6.2.2
The text was updated successfully, but these errors were encountered: