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

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

Issue 2955063004: Fix recovery to prevent generating a parameter with no name and no type (issue 30020) (Closed)
Patch Set: Created 3 years, 6 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 57be2145924e32600f8fa2c00dabd32554017d6d..f1d872eb6b7509e189c74e72e847ed477d8917b8 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -2896,6 +2896,16 @@ class Foo {
"void f(var x()) {}", [ParserErrorCode.FUNCTION_TYPED_PARAMETER_VAR]);
}
+ void test_genericFunctionType_extraLessThan() {
+ createParser('''
+class Wrong<T> {
+ T Function(<List<int> foo) bar;
+}''');
+ CompilationUnit unit = parser.parseCompilationUnit2();
+ expectNotNullIfNoErrors(unit);
+ listener.assertErrorsWithCodes([ParserErrorCode.UNEXPECTED_TOKEN]);
+ }
+
void test_getterInFunction_block_noReturnType() {
FunctionDeclarationStatement statement =
parseStatement("get x { return _x; }");
« 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