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

Unified Diff: pkg/analyzer/test/generated/parser_test.dart

Issue 2477793002: Fix the parsing of generic function expressions (Closed)
Patch Set: 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/lib/src/generated/parser.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/generated/parser_test.dart
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 2465b13535a58156175862d0f46563f488367872..e4b714c87b4ee8294346fb0f6d242278b999e0d0 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -11364,6 +11364,17 @@ void''');
expect(functionExpression.body, isNotNull);
}
+ void test_parsePrimaryExpression_genericFunctionExpression() {
+ enableGenericMethods = true;
+ createParser('<X, Y>(Map<X, Y> m, X x) => m[x]');
+ Expression expression = parser.parsePrimaryExpression();
+ expectNotNullIfNoErrors(expression);
+ listener.assertNoErrors();
+ expect(expression, new isInstanceOf<FunctionExpression>());
+ FunctionExpression function = expression;
+ expect(function.typeParameters, isNotNull);
+ }
+
void test_parsePrimaryExpression_hex() {
String hexLiteral = "3F";
createParser('0x$hexLiteral');
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698