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

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

Issue 2836983002: Fix exception parsing generic function type syntax (Closed)
Patch Set: Created 3 years, 8 months 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 96bfa3adaadecc4a473a4203d9c9708b42d60909..9c605211c71c457371ffbfd77ac076ae65830ad8 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -3946,6 +3946,16 @@ m() {
]);
}
+ void test_typedef_namedFunction() {
+ // TODO(brianwilkerson) Improve recovery for this case.
+ parseCompilationUnit('typedef void Function();', [
+ ParserErrorCode.UNEXPECTED_TOKEN,
+ ParserErrorCode.MISSING_IDENTIFIER,
+ ParserErrorCode.EXPECTED_EXECUTABLE,
+ ParserErrorCode.MISSING_TYPEDEF_PARAMETERS
+ ]);
+ }
+
void test_typedefInClass_withoutReturnType() {
parseCompilationUnit(
"class C { typedef F(x); }", [ParserErrorCode.TYPEDEF_IN_CLASS]);
« 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