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

Unified Diff: pkg/analyzer/lib/src/summary/summarize_const_expr.dart

Issue 2541603002: Support for AwaitExpression in unlinked expressions. (Closed)
Patch Set: Use DartType.flattenFutures() Created 4 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
Index: pkg/analyzer/lib/src/summary/summarize_const_expr.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
index f7e6911352860daa7af3f0640de86d39da73baa5..5a8702a99f7bad5baff07d16c9872b82015351e2 100644
--- a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
@@ -66,7 +66,7 @@ abstract class AbstractConstExprSerializer {
bool isValidConst = true;
/**
- * See [UnlinkedExprBuilder.nmae].
+ * See [UnlinkedExprBuilder.name].
*/
String name = null;
@@ -380,6 +380,10 @@ abstract class AbstractConstExprSerializer {
isValidConst = false;
_serialize(expr.expression);
operations.add(UnlinkedExprOperation.throwException);
+ } else if (expr is AwaitExpression) {
+ isValidConst = false;
+ _serialize(expr.expression);
+ operations.add(UnlinkedExprOperation.await);
} else {
throw new StateError('Unknown expression type: $expr');
}
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698