| Index: pkg/analyzer/lib/src/generated/parser.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
|
| index 2c5cafc18caf2d8684e484e35ed5027f5392cfd4..045a8c459e9414b1e3e4c2fbe478a522c485e653 100644
|
| --- a/pkg/analyzer/lib/src/generated/parser.dart
|
| +++ b/pkg/analyzer/lib/src/generated/parser.dart
|
| @@ -3354,7 +3354,10 @@ class Parser {
|
| TypeAnnotation functionType = parseTypeAnnotation(false);
|
| Token semicolon = _expect(TokenType.SEMICOLON);
|
| if (functionType is! GenericFunctionType) {
|
| - // TODO(brianwilkerson) Generate an error and recover (better than this).
|
| + // TODO(brianwilkerson) Generate a better error.
|
| + _reportErrorForToken(
|
| + ParserErrorCode.INVALID_GENERIC_FUNCTION_TYPE, semicolon);
|
| + // TODO(brianwilkerson) Recover better than this.
|
| return astFactory.genericTypeAlias(
|
| commentAndMetadata.comment,
|
| commentAndMetadata.metadata,
|
| @@ -5632,7 +5635,7 @@ class Parser {
|
| Token previous = startToken;
|
| Token next = startToken.next;
|
| while (next != previous) {
|
| - if (_tokenMatches(startToken, TokenType.LT)) {
|
| + if (_tokenMatches(next, TokenType.LT)) {
|
| depth++;
|
| } else if (_tokenMatches(next, TokenType.GT)) {
|
| depth--;
|
|
|