Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1122)

Unified Diff: runtime/vm/parser.cc

Issue 755053002: Fix parsing of awaitable expressions with nested functions (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/parser.h ('k') | tests/language/await_regression_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 41932)
+++ runtime/vm/parser.cc (working copy)
@@ -9188,7 +9188,7 @@
bool consume_cascades,
SequenceNode** await_preamble) {
TRACE_PARSER("ParseAwaitableExpr");
- parsed_function()->reset_have_seen_await();
+ BoolScope saved_seen_await(&parsed_function()->have_seen_await_expr_, false);
AstNode* expr = ParseExpr(require_compiletime_const, consume_cascades);
if (parsed_function()->have_seen_await()) {
// Make sure we do not reuse the scope to avoid creating contexts that we
@@ -9206,7 +9206,6 @@
} else {
*await_preamble = preamble;
}
- parsed_function()->reset_have_seen_await();
return result;
}
return expr;
« no previous file with comments | « runtime/vm/parser.h ('k') | tests/language/await_regression_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698