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

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

Issue 2837033003: Fix exception when parsing broken code (issue 29447) (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 9c605211c71c457371ffbfd77ac076ae65830ad8..543576994302a8c7b7a81e442931cbcf9612f354 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -3946,6 +3946,26 @@ m() {
]);
}
+ void test_typedef_incomplete() {
+ // TODO(brianwilkerson) Improve recovery for this case.
+ parseCompilationUnit(
+ '''
+class A {}
+class B extends A {}
+
+typedef T
+
+main() {
+ Function<
+}
+''',
+ [
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.UNEXPECTED_TOKEN,
+ ParserErrorCode.EXPECTED_EXECUTABLE
+ ]);
+ }
+
void test_typedef_namedFunction() {
// TODO(brianwilkerson) Improve recovery for this case.
parseCompilationUnit('typedef void Function();', [
« 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