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 |