-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Bug in VM async implementation #22782
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
Comments
Here is a simpler version, that might show more about what is going wrong: test(ex, o) { main() async { Prints: |
This comment was originally written by @mhausner This could very well be the same root cause as issue #22858, because the bug goes away if I reorder some statements. I slightly simplified the example to this: test(ex, o) { main() async { |
This comment was originally written by @mhausner The bug was that the local function p() accidentally re-used a temporary variable from main. The effect was that the call to p() overwrote the value "1" saved from 'await "1"' https://codereview.chromium.org/1007393004/ Added Started label. |
The program:
var p;
test(ex, o) {
if (ex != o) throw "Error '$ex' != '$o'";
}
main() async {
await 3;
p = (i) async => "${await i}";
test(await "1", (await (p(1))));
}
prints:
Unhandled exception:
Uncaught Error: Error '1' != '1'
Stack Trace:
...
The text was updated successfully, but these errors were encountered: