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

Unified Diff: pkg/analyzer/test/src/summary/summary_common.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
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_common.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/summary_common.dart
diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
index 16f3f3c3b126d30aac4449243cadc980d26a849c..fd933013eb40af8e805f38a8a9312914250a3798 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -1843,6 +1843,26 @@ class C<T> {
operators: [UnlinkedExprOperation.pushParameter], strings: ['T']);
}
+ test_constExpr_functionExpression() {
+ if (skipNonConstInitializers) {
+ return;
+ }
+ UnlinkedVariable variable = serializeVariableText('''
+import 'dart:async';
+const v = (f) async => await f;
+''');
+ _assertUnlinkedConst(variable.initializer.localFunctions[0].bodyExpr,
+ isValidConst: false,
+ operators: [
+ UnlinkedExprOperation.pushParameter,
+ UnlinkedExprOperation.await
+ ],
+ strings: [
+ 'f'
+ ],
+ ints: []);
+ }
+
test_constExpr_functionExpression_asArgument() {
// Even though function expressions are not allowed in constant
// declarations, they might occur due to erroneous code, so make sure they
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_common.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698