Version 2.13.0-7.0.dev

Merge commit 'd5fc9fb06f4f7c0baf8a61a878ab98df5ee08e4b' into 'dev'
diff --git a/DEPS b/DEPS
index b7c3de1..e112f19 100644
--- a/DEPS
+++ b/DEPS
@@ -147,7 +147,7 @@
   "source_maps-0.9.4_rev": "38524",
   "source_maps_rev": "53eb92ccfe6e64924054f83038a534b959b12b3e",
   "source_span_rev": "aecb614eac3caa333658493b31a32b4e904cb0a4",
-  "sse_tag": "9a486d058a17e880afa9cc1c3c0dd8bad726bcbc",
+  "sse_tag": "e93a783755b9b048b9156f795461d17a5ece9ce8",
   "stack_trace_tag": "6788afc61875079b71b3d1c3e65aeaa6a25cbc2f",
   "stagehand_rev": "e64ac90cac508981011299c4ceb819149e71f1bd",
   "stream_channel_tag": "d7251e61253ec389ee6e045ee1042311bced8f1d",
diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
index 3c78357..7b15767 100644
--- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
@@ -6431,6 +6431,17 @@
     message: r"""An annotation (metadata) can't use type arguments.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeMetadataTypeArgumentsUninstantiated =
+    messageMetadataTypeArgumentsUninstantiated;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageMetadataTypeArgumentsUninstantiated = const MessageCode(
+    "MetadataTypeArgumentsUninstantiated",
+    index: 114,
+    message:
+        r"""An annotation (metadata) with type arguments must be followed by an argument list.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<Message Function(String name)> templateMethodNotFound =
     const Template<Message Function(String name)>(
         messageTemplate: r"""Method not found: '#name'.""",
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart
index c6cd12aa..c98702e 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart
@@ -1055,9 +1055,7 @@
     token = ensureIdentifier(atToken, IdentifierContext.metadataReference);
     token =
         parseQualifiedRestOpt(token, IdentifierContext.metadataContinuation);
-    if (optional("<", token.next!)) {
-      reportRecoverableError(token.next!, codes.messageMetadataTypeArguments);
-    }
+    bool hasTypeArguments = optional("<", token.next!);
     token = computeTypeParamOrArg(token).parseArguments(token, this);
     Token? period = null;
     if (optional('.', token.next!)) {
@@ -1065,6 +1063,10 @@
       token = ensureIdentifier(
           period, IdentifierContext.metadataContinuationAfterTypeArguments);
     }
+    if (hasTypeArguments && !optional("(", token.next!)) {
+      reportRecoverableError(
+          token, codes.messageMetadataTypeArgumentsUninstantiated);
+    }
     token = parseArgumentsOpt(token);
     listener.endMetadata(atToken, period, token.next!);
     return token;
diff --git a/pkg/analysis_server/test/services/completion/dart/relevance/bool_assignment_relevance_test.dart b/pkg/analysis_server/test/services/completion/dart/relevance/bool_assignment_test.dart
similarity index 92%
rename from pkg/analysis_server/test/services/completion/dart/relevance/bool_assignment_relevance_test.dart
rename to pkg/analysis_server/test/services/completion/dart/relevance/bool_assignment_test.dart
index 5c01e77..039c915 100644
--- a/pkg/analysis_server/test/services/completion/dart/relevance/bool_assignment_relevance_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/relevance/bool_assignment_test.dart
@@ -9,12 +9,12 @@
 
 void main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(BoolAssignmentRelevanceTest);
+    defineReflectiveTests(BoolAssignmentTest);
   });
 }
 
 @reflectiveTest
-class BoolAssignmentRelevanceTest extends CompletionRelevanceTest {
+class BoolAssignmentTest extends CompletionRelevanceTest {
   Future<void> test_boolLiterals_imported() async {
     await addTestFile('''
 foo() {
diff --git a/pkg/analysis_server/test/services/completion/dart/relevance/deprecated_member_relevance_test.dart b/pkg/analysis_server/test/services/completion/dart/relevance/deprecated_member_test.dart
similarity index 87%
rename from pkg/analysis_server/test/services/completion/dart/relevance/deprecated_member_relevance_test.dart
rename to pkg/analysis_server/test/services/completion/dart/relevance/deprecated_member_test.dart
index d13808c..44d0f92 100644
--- a/pkg/analysis_server/test/services/completion/dart/relevance/deprecated_member_relevance_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/relevance/deprecated_member_test.dart
@@ -9,12 +9,12 @@
 
 void main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(DeprecatedMemberRelevanceTest);
+    defineReflectiveTests(DeprecatedMemberTest);
   });
 }
 
 @reflectiveTest
-class DeprecatedMemberRelevanceTest extends CompletionRelevanceTest {
+class DeprecatedMemberTest extends CompletionRelevanceTest {
   Future<void> test_deprecated() async {
     await addTestFile('''
 class A {
diff --git a/pkg/analysis_server/test/services/completion/dart/relevance/instance_member_relevance_test.dart b/pkg/analysis_server/test/services/completion/dart/relevance/instance_member_test.dart
similarity index 95%
rename from pkg/analysis_server/test/services/completion/dart/relevance/instance_member_relevance_test.dart
rename to pkg/analysis_server/test/services/completion/dart/relevance/instance_member_test.dart
index 62388ae..de08d73 100644
--- a/pkg/analysis_server/test/services/completion/dart/relevance/instance_member_relevance_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/relevance/instance_member_test.dart
@@ -8,12 +8,12 @@
 
 void main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(InstanceMemberRelevanceTest);
+    defineReflectiveTests(InstanceMemberTest);
   });
 }
 
 @reflectiveTest
-class InstanceMemberRelevanceTest extends CompletionRelevanceTest {
+class InstanceMemberTest extends CompletionRelevanceTest {
   @override
   bool get supportsAvailableSuggestions => true;
 
diff --git a/pkg/analysis_server/test/services/completion/dart/relevance/is_no_such_method_test.dart b/pkg/analysis_server/test/services/completion/dart/relevance/is_no_such_method_test.dart
new file mode 100644
index 0000000..388a377
--- /dev/null
+++ b/pkg/analysis_server/test/services/completion/dart/relevance/is_no_such_method_test.dart
@@ -0,0 +1,57 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'completion_relevance.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(IsNoSuchMethodTest);
+  });
+}
+
+@reflectiveTest
+class IsNoSuchMethodTest extends CompletionRelevanceTest {
+  Future<void> test_notSuper() async {
+    await addTestFile('''
+void foo(Object o) {
+  o.^;
+}
+''');
+
+    var toStringSuggestion = suggestionWith(
+        completion: 'toString',
+        element: ElementKind.METHOD,
+        kind: CompletionSuggestionKind.INVOCATION);
+
+    var noSuchMethodSuggestion = suggestionWith(
+        completion: 'noSuchMethod',
+        element: ElementKind.METHOD,
+        kind: CompletionSuggestionKind.INVOCATION);
+
+    assertOrder([toStringSuggestion, noSuchMethodSuggestion]);
+  }
+
+  Future<void> test_super() async {
+    await addTestFile('''
+class C {
+  dynamic noSuchMethod(Invocation i) => super.^;
+}
+''');
+
+    var toStringSuggestion = suggestionWith(
+        completion: 'toString',
+        element: ElementKind.METHOD,
+        kind: CompletionSuggestionKind.INVOCATION);
+
+    var noSuchMethodSuggestion = suggestionWith(
+        completion: 'noSuchMethod',
+        element: ElementKind.METHOD,
+        kind: CompletionSuggestionKind.INVOCATION);
+
+    assertOrder([noSuchMethodSuggestion, toStringSuggestion]);
+  }
+}
diff --git a/pkg/analysis_server/test/services/completion/dart/relevance/local_variable_relevance_test.dart b/pkg/analysis_server/test/services/completion/dart/relevance/local_variable_test.dart
similarity index 89%
rename from pkg/analysis_server/test/services/completion/dart/relevance/local_variable_relevance_test.dart
rename to pkg/analysis_server/test/services/completion/dart/relevance/local_variable_test.dart
index 722a9db..c1481fb 100644
--- a/pkg/analysis_server/test/services/completion/dart/relevance/local_variable_relevance_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/relevance/local_variable_test.dart
@@ -9,12 +9,12 @@
 
 void main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(LocalVariableRelevanceTest);
+    defineReflectiveTests(LocalVariableTest);
   });
 }
 
 @reflectiveTest
-class LocalVariableRelevanceTest extends CompletionRelevanceTest {
+class LocalVariableTest extends CompletionRelevanceTest {
   Future<void> test_localVariables() async {
     await addTestFile('''
 int f() {
diff --git a/pkg/analysis_server/test/services/completion/dart/relevance/named_argument_relevance_test.dart b/pkg/analysis_server/test/services/completion/dart/relevance/named_argument_test.dart
similarity index 81%
rename from pkg/analysis_server/test/services/completion/dart/relevance/named_argument_relevance_test.dart
rename to pkg/analysis_server/test/services/completion/dart/relevance/named_argument_test.dart
index ffe4112..ff02ed2 100644
--- a/pkg/analysis_server/test/services/completion/dart/relevance/named_argument_relevance_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/relevance/named_argument_test.dart
@@ -9,13 +9,13 @@
 
 void main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(NamedArgumentRelevanceTest);
-    defineReflectiveTests(NamedArgumentRelevanceWithNullSafetyTest);
+    defineReflectiveTests(NamedArgumentTest);
+    defineReflectiveTests(NamedArgumentWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class NamedArgumentRelevanceTest extends CompletionRelevanceTest {
+class NamedArgumentTest extends CompletionRelevanceTest {
   @override
   void setUp() {
     super.setUp();
@@ -44,8 +44,7 @@
 }
 
 @reflectiveTest
-class NamedArgumentRelevanceWithNullSafetyTest
-    extends NamedArgumentRelevanceTest {
+class NamedArgumentWithNullSafetyTest extends NamedArgumentTest {
   Future<void> test_required() async {
     await addTestFile('''
 void f({int a = 0, required int b}) {}
diff --git a/pkg/analysis_server/test/services/completion/dart/relevance/non_type_member_relevance_test.dart b/pkg/analysis_server/test/services/completion/dart/relevance/non_type_member_test.dart
similarity index 90%
rename from pkg/analysis_server/test/services/completion/dart/relevance/non_type_member_relevance_test.dart
rename to pkg/analysis_server/test/services/completion/dart/relevance/non_type_member_test.dart
index 8c541de..084c91c 100644
--- a/pkg/analysis_server/test/services/completion/dart/relevance/non_type_member_relevance_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/relevance/non_type_member_test.dart
@@ -9,12 +9,12 @@
 
 void main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(NonTypeMemberRelevanceTest);
+    defineReflectiveTests(NonTypeMemberTest);
   });
 }
 
 @reflectiveTest
-class NonTypeMemberRelevanceTest extends CompletionRelevanceTest {
+class NonTypeMemberTest extends CompletionRelevanceTest {
   Future<void> test_contextType_constructorInvocation_before_type() async {
     await addTestFile('''
 class StrWrap {
diff --git a/pkg/analysis_server/test/services/completion/dart/relevance/static_member_relevance_test.dart b/pkg/analysis_server/test/services/completion/dart/relevance/static_member_test.dart
similarity index 93%
rename from pkg/analysis_server/test/services/completion/dart/relevance/static_member_relevance_test.dart
rename to pkg/analysis_server/test/services/completion/dart/relevance/static_member_test.dart
index a78beb0..314b1e0 100644
--- a/pkg/analysis_server/test/services/completion/dart/relevance/static_member_relevance_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/relevance/static_member_test.dart
@@ -8,12 +8,12 @@
 
 void main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(StaticMemberRelevanceTest);
+    defineReflectiveTests(StaticMemberTest);
   });
 }
 
 @reflectiveTest
-class StaticMemberRelevanceTest extends CompletionRelevanceTest {
+class StaticMemberTest extends CompletionRelevanceTest {
   Future<void> test_contextType() async {
     await addTestFile(r'''
 class A {}
diff --git a/pkg/analysis_server/test/services/completion/dart/relevance/test_all.dart b/pkg/analysis_server/test/services/completion/dart/relevance/test_all.dart
index cf8fe01..d6679e5 100644
--- a/pkg/analysis_server/test/services/completion/dart/relevance/test_all.dart
+++ b/pkg/analysis_server/test/services/completion/dart/relevance/test_all.dart
@@ -4,22 +4,24 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'bool_assignment_relevance_test.dart' as bool_assignments;
-import 'deprecated_member_relevance_test.dart' as deprecated_members;
-import 'instance_member_relevance_test.dart' as instance_member_relevance;
-import 'local_variable_relevance_test.dart' as local_variable_relevance;
-import 'named_argument_relevance_test.dart' as named_argument_relevance;
-import 'non_type_member_relevance_test.dart' as non_type_member_relevance;
-import 'static_member_relevance_test.dart' as static_member_relevance;
+import 'bool_assignment_test.dart' as bool_assignments;
+import 'deprecated_member_test.dart' as deprecated_members;
+import 'instance_member_test.dart' as instance_member;
+import 'is_no_such_method_test.dart' as is_no_such_method;
+import 'local_variable_test.dart' as local_variable;
+import 'named_argument_test.dart' as named_argument;
+import 'non_type_member_test.dart' as non_type_member;
+import 'static_member_test.dart' as static_member;
 
 void main() {
   defineReflectiveSuite(() {
     bool_assignments.main();
     deprecated_members.main();
-    instance_member_relevance.main();
-    local_variable_relevance.main();
-    named_argument_relevance.main();
-    non_type_member_relevance.main();
-    static_member_relevance.main();
+    instance_member.main();
+    is_no_such_method.main();
+    local_variable.main();
+    named_argument.main();
+    non_type_member.main();
+    static_member.main();
   });
 }
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index a1b53cc..f8ef9b5 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -624,6 +624,7 @@
   ParserErrorCode.ABSTRACT_TYPEDEF,
   ParserErrorCode.ANNOTATION_ON_TYPE_ARGUMENT,
   ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS,
+  ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED,
   ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER,
   ParserErrorCode.BINARY_OPERATOR_WRITTEN_OUT,
   ParserErrorCode.BREAK_OUTSIDE_OF_LOOP,
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index e07e17d..cab78ed 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -31,7 +31,7 @@
 ///        [StringLiteral] [StringLiteral]+
 class AdjacentStringsImpl extends StringLiteralImpl implements AdjacentStrings {
   /// The strings that are implicitly concatenated.
-  final NodeListImpl<StringLiteral> _strings = NodeListImpl();
+  final NodeListImpl<StringLiteral> _strings = NodeListImpl._();
 
   /// Initialize a newly created list of adjacent strings. To be syntactically
   /// valid, the list of [strings] must contain at least two elements.
@@ -78,7 +78,7 @@
   CommentImpl? _comment;
 
   /// The annotations associated with this node.
-  final NodeListImpl<Annotation> _metadata = NodeListImpl();
+  final NodeListImpl<Annotation> _metadata = NodeListImpl._();
 
   /// Initialize a newly created annotated node. Either or both of the [comment]
   /// and [metadata] can be `null` if the node does not have the corresponding
@@ -330,7 +330,7 @@
   Token leftParenthesis;
 
   /// The expressions producing the values of the arguments.
-  final NodeListImpl<Expression> _arguments = NodeListImpl();
+  final NodeListImpl<Expression> _arguments = NodeListImpl._();
 
   /// The right parenthesis.
   @override
@@ -1055,7 +1055,7 @@
   Token leftBracket;
 
   /// The statements contained in the block.
-  final NodeListImpl<Statement> _statements = NodeListImpl();
+  final NodeListImpl<Statement> _statements = NodeListImpl._();
 
   /// The right curly bracket.
   @override
@@ -1208,7 +1208,7 @@
   late ExpressionImpl _target;
 
   /// The cascade sections sharing the common target.
-  final NodeListImpl<Expression> _cascadeSections = NodeListImpl();
+  final NodeListImpl<Expression> _cascadeSections = NodeListImpl._();
 
   /// Initialize a newly created cascade expression. The list of
   /// [cascadeSections] must contain at least one element.
@@ -1594,7 +1594,7 @@
   Token leftBracket;
 
   /// The members defined by the class or mixin.
-  final NodeListImpl<ClassMember> _members = NodeListImpl();
+  final NodeListImpl<ClassMember> _members = NodeListImpl._();
 
   /// The right curly bracket.
   @override
@@ -1853,7 +1853,7 @@
   /// The references embedded within the documentation comment. This list will
   /// be empty unless this is a documentation comment that has references embedded
   /// within it.
-  final NodeListImpl<CommentReference> _references = NodeListImpl();
+  final NodeListImpl<CommentReference> _references = NodeListImpl._();
 
   /// Initialize a newly created comment. The list of [tokens] must contain at
   /// least one token. The [_type] is the type of the comment. The list of
@@ -2011,10 +2011,10 @@
   ScriptTagImpl? _scriptTag;
 
   /// The directives contained in this compilation unit.
-  final NodeListImpl<Directive> _directives = NodeListImpl();
+  final NodeListImpl<Directive> _directives = NodeListImpl._();
 
   /// The declarations contained in this compilation unit.
-  final NodeListImpl<CompilationUnitMember> _declarations = NodeListImpl();
+  final NodeListImpl<CompilationUnitMember> _declarations = NodeListImpl._();
 
   /// The last token in the token stream that was parsed to form this
   /// compilation unit. This token should always have a type of [TokenType.EOF].
@@ -2429,7 +2429,7 @@
   Token? separator;
 
   /// The initializers associated with the constructor.
-  final NodeListImpl<ConstructorInitializer> _initializers = NodeListImpl();
+  final NodeListImpl<ConstructorInitializer> _initializers = NodeListImpl._();
 
   /// The name of the constructor to which this constructor will be redirected,
   /// or `null` if this is not a redirecting factory constructor.
@@ -3125,7 +3125,7 @@
 ///        [SimpleIdentifier] ('.' [SimpleIdentifier])*
 class DottedNameImpl extends AstNodeImpl implements DottedName {
   /// The components of the identifier.
-  final NodeListImpl<SimpleIdentifier> _components = NodeListImpl();
+  final NodeListImpl<SimpleIdentifier> _components = NodeListImpl._();
 
   /// Initialize a newly created dotted name.
   DottedNameImpl(List<SimpleIdentifier> components) {
@@ -3327,7 +3327,7 @@
   Token leftBracket;
 
   /// The enumeration constants being declared.
-  final NodeListImpl<EnumConstantDeclaration> _constants = NodeListImpl();
+  final NodeListImpl<EnumConstantDeclaration> _constants = NodeListImpl._();
 
   /// The right curly bracket.
   @override
@@ -3751,7 +3751,7 @@
   Token leftBracket;
 
   /// The members being added to the extended class.
-  final NodeListImpl<ClassMember> _members = NodeListImpl();
+  final NodeListImpl<ClassMember> _members = NodeListImpl._();
 
   @override
   Token rightBracket;
@@ -4423,7 +4423,7 @@
   Token leftParenthesis;
 
   /// The parameters associated with the method.
-  final NodeListImpl<FormalParameter> _parameters = NodeListImpl();
+  final NodeListImpl<FormalParameter> _parameters = NodeListImpl._();
 
   /// The left square bracket ('[') or left curly brace ('{') introducing the
   /// optional parameters, or `null` if there are no optional parameters.
@@ -4537,7 +4537,7 @@
   Token rightSeparator;
 
   /// The list of expressions run after each execution of the loop body.
-  final NodeListImpl<Expression> _updaters = NodeListImpl();
+  final NodeListImpl<Expression> _updaters = NodeListImpl._();
 
   /// Initialize a newly created for statement. Either the [variableList] or the
   /// [initialization] must be `null`. Either the [condition] and the list of
@@ -5505,7 +5505,7 @@
 ///        'hide' [SimpleIdentifier] (',' [SimpleIdentifier])*
 class HideCombinatorImpl extends CombinatorImpl implements HideCombinator {
   /// The list of names from the library that are hidden by this combinator.
-  final NodeListImpl<SimpleIdentifier> _hiddenNames = NodeListImpl();
+  final NodeListImpl<SimpleIdentifier> _hiddenNames = NodeListImpl._();
 
   /// Initialize a newly created import show combinator.
   HideCombinatorImpl(Token keyword, List<SimpleIdentifier> hiddenNames)
@@ -5728,7 +5728,7 @@
   Token implementsKeyword;
 
   /// The interfaces that are being implemented.
-  final NodeListImpl<TypeName> _interfaces = NodeListImpl();
+  final NodeListImpl<TypeName> _interfaces = NodeListImpl._();
 
   /// Initialize a newly created implements clause.
   ImplementsClauseImpl(this.implementsKeyword, List<TypeName> interfaces) {
@@ -6472,7 +6472,7 @@
 ///       [Label]+ [Statement]
 class LabeledStatementImpl extends StatementImpl implements LabeledStatement {
   /// The labels being associated with the statement.
-  final NodeListImpl<Label> _labels = NodeListImpl();
+  final NodeListImpl<Label> _labels = NodeListImpl._();
 
   /// The statement with which the labels are being associated.
   late StatementImpl _statement;
@@ -6635,7 +6635,7 @@
 class LibraryIdentifierImpl extends IdentifierImpl
     implements LibraryIdentifier {
   /// The components of the identifier.
-  final NodeListImpl<SimpleIdentifier> _components = NodeListImpl();
+  final NodeListImpl<SimpleIdentifier> _components = NodeListImpl._();
 
   /// Initialize a newly created prefixed identifier.
   LibraryIdentifierImpl(List<SimpleIdentifier> components) {
@@ -6694,7 +6694,7 @@
   Token leftBracket;
 
   /// The expressions used to compute the elements of the list.
-  final NodeListImpl<CollectionElement> _elements = NodeListImpl();
+  final NodeListImpl<CollectionElement> _elements = NodeListImpl._();
 
   /// The right square bracket.
   @override
@@ -7395,10 +7395,10 @@
 
   /// The configurations used to control which library will actually be loaded
   /// at run-time.
-  final NodeListImpl<Configuration> _configurations = NodeListImpl();
+  final NodeListImpl<Configuration> _configurations = NodeListImpl._();
 
   /// The combinators used to control which names are imported or exported.
-  final NodeListImpl<Combinator> _combinators = NodeListImpl();
+  final NodeListImpl<Combinator> _combinators = NodeListImpl._();
 
   /// The semicolon terminating the directive.
   @override
@@ -7545,16 +7545,17 @@
 /// A list of AST nodes that have a common parent.
 class NodeListImpl<E extends AstNode> with ListMixin<E> implements NodeList<E> {
   /// The node that is the parent of each of the elements in the list.
-  AstNodeImpl? _owner;
+  late final AstNodeImpl _owner;
 
   /// The elements contained in the list.
   List<E> _elements = <E>[];
 
   /// Initialize a newly created list of nodes such that all of the nodes that
   /// are added to the list will have their parent set to the given [owner].
-  NodeListImpl({AstNodeImpl? owner}) {
-    _owner = owner;
-  }
+  NodeListImpl(AstNodeImpl owner) : _owner = owner;
+
+  /// Create a partially initialized instance, [_initialize] must be called.
+  NodeListImpl._();
 
   @override
   Token? get beginToken {
@@ -7582,7 +7583,7 @@
   }
 
   @override
-  AstNode get owner => _owner!;
+  AstNode get owner => _owner;
 
   @override
   E operator [](int index) {
@@ -7597,8 +7598,8 @@
     if (index < 0 || index >= _elements.length) {
       throw RangeError("Index: $index, Size: ${_elements.length}");
     }
-    _owner!._becomeParentOf(node as AstNodeImpl);
     _elements[index] = node;
+    _owner._becomeParentOf(node as AstNodeImpl);
   }
 
   @override
@@ -7615,24 +7616,11 @@
   }
 
   @override
-  bool addAll(Iterable<E>? nodes) {
-    if (nodes != null && nodes.isNotEmpty) {
-      if (nodes is List<E>) {
-        int length = nodes.length;
-        for (int i = 0; i < length; i++) {
-          E node = nodes[i];
-          _elements.add(node);
-          _owner!._becomeParentOf(node as AstNodeImpl);
-        }
-      } else {
-        for (E node in nodes) {
-          _elements.add(node);
-          _owner!._becomeParentOf(node as AstNodeImpl);
-        }
-      }
-      return true;
+  void addAll(Iterable<E> nodes) {
+    for (E node in nodes) {
+      _elements.add(node);
+      _owner._becomeParentOf(node as AstNodeImpl);
     }
-    return false;
   }
 
   @override
@@ -7642,16 +7630,8 @@
 
   @override
   void insert(int index, E node) {
-    int length = _elements.length;
-    if (index < 0 || index > length) {
-      throw RangeError("Index: $index, Size: ${_elements.length}");
-    }
-    _owner!._becomeParentOf(node as AstNodeImpl);
-    if (length == 0) {
-      _elements.add(node);
-    } else {
-      _elements.insert(index, node);
-    }
+    _elements.insert(index, node);
+    _owner._becomeParentOf(node as AstNodeImpl);
   }
 
   @override
@@ -7659,28 +7639,20 @@
     if (index < 0 || index >= _elements.length) {
       throw RangeError("Index: $index, Size: ${_elements.length}");
     }
-    E removedNode = _elements[index];
-    _elements.removeAt(index);
-    return removedNode;
-  }
-
-  /// This is non-API and may be changed or removed at any point.
-  ///
-  /// Changes the length of this list
-  /// If [newLength] is greater than the current length,
-  /// entries are initialized to `null`.
-  ///
-  /// This list should NOT contain any `null` elements,
-  /// so be sure to immediately follow a call to this method with calls
-  /// to replace all the `null` elements with non-`null` elements.
-  void setLength(int newLength) {
-    _elements.length = newLength;
+    return _elements.removeAt(index);
   }
 
   /// Set the [owner] of this container, and populate it with [elements].
   void _initialize(AstNodeImpl owner, List<E>? elements) {
     _owner = owner;
-    addAll(elements);
+    if (elements != null) {
+      var length = elements.length;
+      for (var i = 0; i < length; i++) {
+        var node = elements[i];
+        _elements.add(node);
+        owner._becomeParentOf(node as AstNodeImpl);
+      }
+    }
   }
 }
 
@@ -7697,7 +7669,7 @@
   CommentImpl? _comment;
 
   /// The annotations associated with this parameter.
-  final NodeListImpl<Annotation> _metadata = NodeListImpl();
+  final NodeListImpl<Annotation> _metadata = NodeListImpl._();
 
   /// The 'covariant' keyword, or `null` if the keyword was not used.
   @override
@@ -7873,7 +7845,7 @@
   Token onKeyword;
 
   /// The classes are super-class constraints for the mixin.
-  final NodeListImpl<TypeName> _superclassConstraints = NodeListImpl();
+  final NodeListImpl<TypeName> _superclassConstraints = NodeListImpl._();
 
   /// Initialize a newly created on clause.
   OnClauseImpl(this.onKeyword, List<TypeName> superclassConstraints) {
@@ -8651,7 +8623,7 @@
   Token leftBracket;
 
   /// The syntactic elements in the set.
-  final NodeListImpl<CollectionElement> _elements = NodeListImpl();
+  final NodeListImpl<CollectionElement> _elements = NodeListImpl._();
 
   @override
   Token rightBracket;
@@ -8748,7 +8720,7 @@
 class ShowCombinatorImpl extends CombinatorImpl implements ShowCombinator {
   /// The list of names from the library that are made visible by this
   /// combinator.
-  final NodeListImpl<SimpleIdentifier> _shownNames = NodeListImpl();
+  final NodeListImpl<SimpleIdentifier> _shownNames = NodeListImpl._();
 
   /// Initialize a newly created import show combinator.
   ShowCombinatorImpl(Token keyword, List<SimpleIdentifier> shownNames)
@@ -9224,7 +9196,7 @@
 class StringInterpolationImpl extends SingleStringLiteralImpl
     implements StringInterpolation {
   /// The elements that will be composed to produce the resulting string.
-  final NodeListImpl<InterpolationElement> _elements = NodeListImpl();
+  final NodeListImpl<InterpolationElement> _elements = NodeListImpl._();
 
   /// Initialize a newly created string interpolation expression.
   StringInterpolationImpl(List<InterpolationElement> elements) {
@@ -9592,7 +9564,7 @@
 ///      | switchDefault
 abstract class SwitchMemberImpl extends AstNodeImpl implements SwitchMember {
   /// The labels associated with the switch member.
-  final NodeListImpl<Label> _labels = NodeListImpl();
+  final NodeListImpl<Label> _labels = NodeListImpl._();
 
   /// The token representing the 'case' or 'default' keyword.
   @override
@@ -9603,7 +9575,7 @@
   Token colon;
 
   /// The statements that will be executed if this switch member is selected.
-  final NodeListImpl<Statement> _statements = NodeListImpl();
+  final NodeListImpl<Statement> _statements = NodeListImpl._();
 
   /// Initialize a newly created switch member. The list of [labels] can be
   /// `null` if there are no labels.
@@ -9662,7 +9634,7 @@
   Token leftBracket;
 
   /// The switch members that can be selected by the expression.
-  final NodeListImpl<SwitchMember> _members = NodeListImpl();
+  final NodeListImpl<SwitchMember> _members = NodeListImpl._();
 
   /// The right curly bracket.
   @override
@@ -9919,7 +9891,7 @@
   late BlockImpl _body;
 
   /// The catch clauses contained in the try statement.
-  final NodeListImpl<CatchClause> _catchClauses = NodeListImpl();
+  final NodeListImpl<CatchClause> _catchClauses = NodeListImpl._();
 
   /// The token representing the 'finally' keyword, or `null` if the statement
   /// does not contain a finally clause.
@@ -10047,7 +10019,7 @@
   Token leftBracket;
 
   /// The type arguments associated with the type.
-  final NodeListImpl<TypeAnnotation> _arguments = NodeListImpl();
+  final NodeListImpl<TypeAnnotation> _arguments = NodeListImpl._();
 
   /// The right bracket.
   @override
@@ -10299,7 +10271,7 @@
   final Token leftBracket;
 
   /// The type parameters in the list.
-  final NodeListImpl<TypeParameter> _typeParameters = NodeListImpl();
+  final NodeListImpl<TypeParameter> _typeParameters = NodeListImpl._();
 
   /// The right angle bracket.
   @override
@@ -10578,7 +10550,7 @@
   TypeAnnotationImpl? _type;
 
   /// A list containing the individual variables being declared.
-  final NodeListImpl<VariableDeclaration> _variables = NodeListImpl();
+  final NodeListImpl<VariableDeclaration> _variables = NodeListImpl._();
 
   /// Initialize a newly created variable declaration list. Either or both of
   /// the [comment] and [metadata] can be `null` if the variable list does not
@@ -10778,7 +10750,7 @@
   Token withKeyword;
 
   /// The names of the mixins that were specified.
-  final NodeListImpl<TypeName> _mixinTypes = NodeListImpl();
+  final NodeListImpl<TypeName> _mixinTypes = NodeListImpl._();
 
   /// Initialize a newly created with clause.
   WithClauseImpl(this.withKeyword, List<TypeName> mixinTypes) {
diff --git a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
index 43fa50a..dca4023 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
@@ -942,7 +942,7 @@
 
   @override
   NodeList<E> nodeList<E extends AstNode>(AstNode owner) =>
-      NodeListImpl<E>(owner: owner as AstNodeImpl);
+      NodeListImpl<E>(owner as AstNodeImpl);
 
   @override
   NullLiteral nullLiteral(Token literal) => NullLiteralImpl(literal);
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
index 57029cf..e881af8 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
@@ -61,6 +61,9 @@
   static const ParserErrorCode ANNOTATION_WITH_TYPE_ARGUMENTS =
       _ANNOTATION_WITH_TYPE_ARGUMENTS;
 
+  static const ParserErrorCode ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED =
+      _ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED;
+
   /**
    * 16.32 Identifier Reference: It is a compile-time error if any of the
    * identifiers async, await, or yield is used as an identifier in a function
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
index 8225f80..f6d971f 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
@@ -121,6 +121,7 @@
   _ANNOTATION_ON_TYPE_ARGUMENT,
   _BINARY_OPERATOR_WRITTEN_OUT,
   _EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD,
+  _ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED,
 ];
 
 const ParserErrorCode _ABSTRACT_CLASS_MEMBER = ParserErrorCode(
@@ -150,6 +151,10 @@
     'ANNOTATION_WITH_TYPE_ARGUMENTS',
     r"An annotation (metadata) can't use type arguments.");
 
+const ParserErrorCode _ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED =
+    ParserErrorCode('ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED',
+        r"An annotation (metadata) with type arguments must be followed by an argument list.");
+
 const ParserErrorCode _BINARY_OPERATOR_WRITTEN_OUT = ParserErrorCode(
     'BINARY_OPERATOR_WRITTEN_OUT',
     r"Binary operator '#string' is written as '#string2' instead of the written out word.",
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index 4c4dfb7..3718053 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -22,6 +22,7 @@
         messageInvalidInitializer,
         messageInvalidSuperInInitializer,
         messageInvalidThisInInitializer,
+        messageMetadataTypeArguments,
         messageMissingAssignableSelector,
         messageNativeClauseShouldBeAnnotation,
         messageOperatorWithTypeParameters,
@@ -1831,11 +1832,17 @@
     var invocation = pop() as MethodInvocation?;
     var constructorName =
         periodBeforeName != null ? pop() as SimpleIdentifier : null;
-    pop(); // Type arguments, not allowed.
+    var typeArguments = pop() as TypeArgumentList?;
+    if (typeArguments != null &&
+        !_featureSet.isEnabled(Feature.generic_metadata)) {
+      handleRecoverableError(messageMetadataTypeArguments,
+          typeArguments.beginToken, typeArguments.beginToken);
+    }
     var name = pop() as Identifier;
     push(ast.annotation(
         atSign: atSign,
         name: name,
+        typeArguments: typeArguments,
         period: periodBeforeName,
         constructorName: constructorName,
         arguments: invocation?.argumentList));
diff --git a/pkg/analyzer/test/generated/generic_metadata_parser_test.dart b/pkg/analyzer/test/generated/generic_metadata_parser_test.dart
new file mode 100644
index 0000000..d3ff54e
--- /dev/null
+++ b/pkg/analyzer/test/generated/generic_metadata_parser_test.dart
@@ -0,0 +1,183 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/analysis/features.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/error/syntactic_errors.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'parser_test_base.dart';
+import 'test_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(GenericMetadataEnabledParserTest);
+    defineReflectiveTests(GenericMetadataDisabledParserTest);
+  });
+}
+
+@reflectiveTest
+class GenericMetadataDisabledParserTest extends FastaParserTestCase
+    with GenericMetadataParserTest {
+  @override
+  CompilationUnit _parseCompilationUnit(String content,
+      {List<ExpectedError>? errors, required ExpectedError? disabledError}) {
+    var combinedErrors =
+        disabledError == null ? errors : [disabledError, ...?errors];
+    return parseCompilationUnit(content,
+        errors: combinedErrors,
+        featureSet: FeatureSet.forTesting(sdkVersion: '2.12'));
+  }
+}
+
+@reflectiveTest
+class GenericMetadataEnabledParserTest extends FastaParserTestCase
+    with GenericMetadataParserTest {
+  @override
+  CompilationUnit _parseCompilationUnit(String content,
+          {List<ExpectedError>? errors,
+          required ExpectedError? disabledError}) =>
+      parseCompilationUnit(content,
+          errors: errors,
+          featureSet: FeatureSet.forTesting(
+              sdkVersion: '2.12',
+              additionalFeatures: [Feature.generic_metadata]));
+}
+
+mixin GenericMetadataParserTest on FastaParserTestCase {
+  void test_className_prefixed_constructorName_absent() {
+    var compilationUnit = _parseCompilationUnit('@p.A<B>() class C {}',
+        disabledError: expectedError(
+            ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS, 4, 1));
+    var classDeclaration =
+        compilationUnit.declarations.single as ClassDeclaration;
+    var annotation = classDeclaration.metadata.single;
+    var className = annotation.name as PrefixedIdentifier;
+    expect(className.prefix.name, 'p');
+    expect(className.identifier.name, 'A');
+    var typeArgument = annotation.typeArguments!.arguments.single as TypeName;
+    var typeArgumentName = typeArgument.name as SimpleIdentifier;
+    expect(typeArgumentName.name, 'B');
+    expect(annotation.constructorName, isNull);
+  }
+
+  void test_className_prefixed_constructorName_present() {
+    var compilationUnit = _parseCompilationUnit('@p.A<B>.ctor() class C {}',
+        disabledError: expectedError(
+            ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS, 4, 1));
+    var classDeclaration =
+        compilationUnit.declarations.single as ClassDeclaration;
+    var annotation = classDeclaration.metadata.single;
+    var className = annotation.name as PrefixedIdentifier;
+    expect(className.prefix.name, 'p');
+    expect(className.identifier.name, 'A');
+    var typeArgument = annotation.typeArguments!.arguments.single as TypeName;
+    var typeArgumentName = typeArgument.name as SimpleIdentifier;
+    expect(typeArgumentName.name, 'B');
+    expect(annotation.constructorName!.name, 'ctor');
+  }
+
+  void test_className_unprefixed_constructorName_absent() {
+    var compilationUnit = _parseCompilationUnit('@A<B>() class C {}',
+        disabledError: expectedError(
+            ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS, 2, 1));
+    var classDeclaration =
+        compilationUnit.declarations.single as ClassDeclaration;
+    var annotation = classDeclaration.metadata.single;
+    var className = annotation.name as SimpleIdentifier;
+    expect(className.name, 'A');
+    var typeArgument = annotation.typeArguments!.arguments.single as TypeName;
+    var typeArgumentName = typeArgument.name as SimpleIdentifier;
+    expect(typeArgumentName.name, 'B');
+    expect(annotation.constructorName, isNull);
+  }
+
+  void test_className_unprefixed_constructorName_present() {
+    var compilationUnit = _parseCompilationUnit('@A<B>.ctor() class C {}',
+        disabledError: expectedError(
+            ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS, 2, 1));
+    var classDeclaration =
+        compilationUnit.declarations.single as ClassDeclaration;
+    var annotation = classDeclaration.metadata.single;
+    var className = annotation.name as SimpleIdentifier;
+    expect(className.name, 'A');
+    var typeArgument = annotation.typeArguments!.arguments.single as TypeName;
+    var typeArgumentName = typeArgument.name as SimpleIdentifier;
+    expect(typeArgumentName.name, 'B');
+    expect(annotation.constructorName!.name, 'ctor');
+  }
+
+  void test_reference_prefixed() {
+    var compilationUnit = _parseCompilationUnit('@p.x<A> class C {}',
+        errors: [
+          expectedError(
+              ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED,
+              6,
+              1),
+        ],
+        disabledError: expectedError(
+            ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS, 4, 1));
+    var classDeclaration =
+        compilationUnit.declarations.single as ClassDeclaration;
+    var annotation = classDeclaration.metadata.single;
+    var name = annotation.name as PrefixedIdentifier;
+    expect(name.prefix.name, 'p');
+    expect(name.identifier.name, 'x');
+    var typeArgument = annotation.typeArguments!.arguments.single as TypeName;
+    var typeArgumentName = typeArgument.name as SimpleIdentifier;
+    expect(typeArgumentName.name, 'A');
+    expect(annotation.constructorName, isNull);
+  }
+
+  void test_reference_unprefixed() {
+    var compilationUnit = _parseCompilationUnit('@x<A> class C {}',
+        errors: [
+          expectedError(
+              ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED,
+              4,
+              1),
+        ],
+        disabledError: expectedError(
+            ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS, 2, 1));
+    var classDeclaration =
+        compilationUnit.declarations.single as ClassDeclaration;
+    var annotation = classDeclaration.metadata.single;
+    var name = annotation.name as SimpleIdentifier;
+    expect(name.name, 'x');
+    var typeArgument = annotation.typeArguments!.arguments.single as TypeName;
+    var typeArgumentName = typeArgument.name as SimpleIdentifier;
+    expect(typeArgumentName.name, 'A');
+    expect(annotation.constructorName, isNull);
+  }
+
+  test_typeArguments_after_constructorName() {
+    _parseCompilationUnit('@p.A.ctor<B>() class C {}',
+        errors: [
+          expectedError(ParserErrorCode.EXPECTED_EXECUTABLE, 9, 1),
+          expectedError(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, 10, 1),
+          expectedError(ParserErrorCode.EXPECTED_TOKEN, 10, 1),
+          expectedError(ParserErrorCode.TOP_LEVEL_OPERATOR, 11, 1),
+          expectedError(ParserErrorCode.MISSING_FUNCTION_BODY, 15, 5),
+        ],
+        disabledError: null);
+  }
+
+  test_typeArguments_after_prefix() {
+    _parseCompilationUnit('@p<A>.B.ctor() class C {}',
+        errors: [
+          expectedError(
+              ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED,
+              6,
+              1),
+          expectedError(ParserErrorCode.EXPECTED_EXECUTABLE, 7, 1),
+          expectedError(ParserErrorCode.MISSING_FUNCTION_BODY, 15, 5),
+        ],
+        disabledError: expectedError(
+            ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS, 2, 1));
+  }
+
+  CompilationUnit _parseCompilationUnit(String content,
+      {List<ExpectedError>? errors, required ExpectedError? disabledError});
+}
diff --git a/pkg/analyzer/test/generated/test_all.dart b/pkg/analyzer/test/generated/test_all.dart
index 7ef4b60..197c167 100644
--- a/pkg/analyzer/test/generated/test_all.dart
+++ b/pkg/analyzer/test/generated/test_all.dart
@@ -16,6 +16,7 @@
 import 'expression_parser_test.dart' as expression_parser;
 import 'extension_methods_parser_test.dart' as extension_methods_parser;
 import 'formal_parameter_parser_test.dart' as formal_parameter_parser;
+import 'generic_metadata_parser_test.dart' as generic_metadata_parser;
 import 'invalid_code_test.dart' as invalid_code;
 import 'issues_test.dart' as issues;
 import 'java_core_test.dart' as java_core_test;
@@ -55,6 +56,7 @@
     expression_parser.main();
     extension_methods_parser.main();
     formal_parameter_parser.main();
+    generic_metadata_parser.main();
     invalid_code.main();
     issues.main();
     java_core_test.main();
diff --git a/pkg/analyzer/test/generated/utilities_test.dart b/pkg/analyzer/test/generated/utilities_test.dart
index f518e33..2ef1bb7 100644
--- a/pkg/analyzer/test/generated/utilities_test.dart
+++ b/pkg/analyzer/test/generated/utilities_test.dart
@@ -78,6 +78,13 @@
     _assertCloneUnitMember('@A.c() main() {}');
   }
 
+  void test_visitAnnotation_constructor_generic() {
+    _assertCloneUnitMember('@A<int>.c() main() {}',
+        featureSet: FeatureSet.forTesting(
+            sdkVersion: '2.12',
+            additionalFeatures: [Feature.generic_metadata]));
+  }
+
   void test_visitAnnotation_withComment() {
     CompilationUnitMember clazz =
         _parseUnitMember('/** comment */ @deprecated class A {}');
@@ -1160,8 +1167,8 @@
     _assertClone(node);
   }
 
-  void _assertCloneUnitMember(String code) {
-    AstNode node = _parseUnitMember(code);
+  void _assertCloneUnitMember(String code, {FeatureSet? featureSet}) {
+    AstNode node = _parseUnitMember(code, featureSet: featureSet);
     _assertClone(node);
   }
 
@@ -1178,10 +1185,10 @@
     return body.block.statements.single;
   }
 
-  CompilationUnit _parseUnit(String code) {
+  CompilationUnit _parseUnit(String code, {FeatureSet? featureSet}) {
     GatheringErrorListener listener = GatheringErrorListener();
     CharSequenceReader reader = CharSequenceReader(code);
-    var featureSet = FeatureSet.forTesting(sdkVersion: '2.2.2');
+    featureSet ??= FeatureSet.forTesting(sdkVersion: '2.2.2');
     Scanner scanner = Scanner(TestSource(), reader, listener)
       ..configureFeatures(
         featureSetForOverriding: featureSet,
@@ -1199,8 +1206,9 @@
     return unit;
   }
 
-  CompilationUnitMember _parseUnitMember(String code) {
-    CompilationUnit unit = _parseUnit(code);
+  CompilationUnitMember _parseUnitMember(String code,
+      {FeatureSet? featureSet}) {
+    CompilationUnit unit = _parseUnit(code, featureSet: featureSet);
     return unit.declarations.single;
   }
 
diff --git a/pkg/dds/CHANGELOG.md b/pkg/dds/CHANGELOG.md
index 261fdd0..62904a1 100644
--- a/pkg/dds/CHANGELOG.md
+++ b/pkg/dds/CHANGELOG.md
@@ -1,3 +1,6 @@
+# 1.7.5
+- Add 30 second keep alive period for SSE connections.
+
 # 1.7.4
 - Update `package:vm_service` to 6.0.1-nullsafety.0.
 
diff --git a/pkg/dds/lib/src/dds_impl.dart b/pkg/dds/lib/src/dds_impl.dart
index 137cd20..6daaedd 100644
--- a/pkg/dds/lib/src/dds_impl.dart
+++ b/pkg/dds/lib/src/dds_impl.dart
@@ -231,9 +231,18 @@
       });
 
   Handler _sseHandler() {
+    // Give connections time to reestablish before considering them closed.
+    // Required to reestablish connections killed by UberProxy.
+    const keepAlive = Duration(seconds: 30);
     final handler = authCodesEnabled
-        ? SseHandler(Uri.parse('/$_authCode/$_kSseHandlerPath'))
-        : SseHandler(Uri.parse('/$_kSseHandlerPath'));
+        ? SseHandler(
+            Uri.parse('/$_authCode/$_kSseHandlerPath'),
+            keepAlive: keepAlive,
+          )
+        : SseHandler(
+            Uri.parse('/$_kSseHandlerPath'),
+            keepAlive: keepAlive,
+          );
 
     handler.connections.rest.listen((sseConnection) {
       final client = DartDevelopmentServiceClient.fromSSEConnection(
diff --git a/pkg/dds/pubspec.yaml b/pkg/dds/pubspec.yaml
index 92dee88..469fc0e 100644
--- a/pkg/dds/pubspec.yaml
+++ b/pkg/dds/pubspec.yaml
@@ -3,7 +3,7 @@
   A library used to spawn the Dart Developer Service, used to communicate with
   a Dart VM Service instance.
 
-version: 1.7.4
+version: 1.7.5
 
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/dds
 
@@ -18,7 +18,7 @@
   shelf: ^0.7.5
   shelf_proxy: ^0.1.0+7
   shelf_web_socket: ^0.2.3
-  sse: ^3.5.0
+  sse: ^3.7.0
   stream_channel: ^2.0.0
   vm_service: ^6.0.1-nullsafety.0
   web_socket_channel: ^1.1.0
diff --git a/pkg/dds/test/web/sse_smoke_driver.dart b/pkg/dds/test/web/sse_smoke_driver.dart
index 66ef20c..4f0ab25 100644
--- a/pkg/dds/test/web/sse_smoke_driver.dart
+++ b/pkg/dds/test/web/sse_smoke_driver.dart
@@ -24,9 +24,6 @@
   final ddsUri = await testerStream.next;
   final ddsChannel = SseClient(ddsUri);
 
-  // Wait for ddsChannel to be established.
-  await ddsChannel.onOpen.first;
-
   final vmService = VmService(
     ddsChannel.stream,
     (e) => ddsChannel.sink.add(e),
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index ef8334f..85e7a89 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -630,7 +630,8 @@
     if (arguments != null) {
       push(arguments);
       _buildConstructorReferenceInvocation(
-          beginToken.next, beginToken.offset, Constness.explicitConst);
+          beginToken.next, beginToken.offset, Constness.explicitConst,
+          inMetadata: true);
       push(popForValue());
     } else {
       pop(); // Name last identifier
@@ -4360,11 +4361,13 @@
   void endNewExpression(Token token) {
     debugEvent("NewExpression");
     _buildConstructorReferenceInvocation(
-        token.next, token.offset, Constness.explicitNew);
+        token.next, token.offset, Constness.explicitNew,
+        inMetadata: false);
   }
 
   void _buildConstructorReferenceInvocation(
-      Token nameToken, int offset, Constness constness) {
+      Token nameToken, int offset, Constness constness,
+      {bool inMetadata}) {
     assert(checkState(nameToken, [
       /*arguments*/ ValueKinds.Arguments,
       /*constructor name identifier*/ ValueKinds.IdentifierOrNull,
@@ -4381,6 +4384,10 @@
     Token nameLastToken = nameLastIdentifier?.token ?? nameToken;
     String name = pop();
     List<UnresolvedType> typeArguments = pop();
+    if (inMetadata && typeArguments != null) {
+      handleRecoverableError(fasta.messageMetadataTypeArguments,
+          nameLastToken.next, nameLastToken.next);
+    }
 
     Object type = pop();
 
@@ -4406,7 +4413,8 @@
   void endImplicitCreationExpression(Token token) {
     debugEvent("ImplicitCreationExpression");
     _buildConstructorReferenceInvocation(
-        token.next, token.offset, Constness.implicit);
+        token.next, token.offset, Constness.implicit,
+        inMetadata: false);
   }
 
   @override
@@ -4660,7 +4668,8 @@
   void endConstExpression(Token token) {
     debugEvent("endConstExpression");
     _buildConstructorReferenceInvocation(
-        token.next, token.offset, Constness.explicitConst);
+        token.next, token.offset, Constness.explicitConst,
+        inMetadata: false);
   }
 
   @override
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index b054d1d..afe7438 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -1501,6 +1501,13 @@
   template: "An annotation (metadata) can't use type arguments."
   analyzerCode: ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS
 
+MetadataTypeArgumentsUninstantiated:
+  index: 114
+  template: "An annotation (metadata) with type arguments must be followed by an argument list."
+  analyzerCode: ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED
+  script:
+    - "@deprecated<int> class C {}"
+
 ConstructorNotFound:
   template: "Couldn't find constructor '#name'."
   analyzerCode: CONSTRUCTOR_NOT_FOUND
diff --git a/pkg/front_end/test/spell_checking_list_code.txt b/pkg/front_end/test/spell_checking_list_code.txt
index 92adf25..7fe58e0 100644
--- a/pkg/front_end/test/spell_checking_list_code.txt
+++ b/pkg/front_end/test/spell_checking_list_code.txt
@@ -1268,6 +1268,7 @@
 unifier
 unify
 uninstantiable
+uninstantiated
 unions
 uniqueness
 unittest
diff --git a/tests/language/generic/metadata_in_function_body_test.dart b/tests/language/generic/metadata_in_function_body_test.dart
new file mode 100644
index 0000000..40c8549
--- /dev/null
+++ b/tests/language/generic/metadata_in_function_body_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2021, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Check that annotations inside function bodies cannot use type arguments, but
+// can be raw.
+
+class C<T> {
+  const C();
+}
+
+void ignore(dynamic value) {}
+
+main() {
+  @C()
+  @C<dynamic>()
+  //^
+  // [analyzer] SYNTACTIC_ERROR.ANNOTATION_WITH_TYPE_ARGUMENTS
+  // [cfe] An annotation (metadata) can't use type arguments.
+  @C<int>()
+  //^
+  // [analyzer] SYNTACTIC_ERROR.ANNOTATION_WITH_TYPE_ARGUMENTS
+  // [cfe] An annotation (metadata) can't use type arguments.
+  int i = 0;
+  ignore(i);
+}
diff --git a/tests/language_2/generic/metadata_in_function_body_test.dart b/tests/language_2/generic/metadata_in_function_body_test.dart
new file mode 100644
index 0000000..40c8549
--- /dev/null
+++ b/tests/language_2/generic/metadata_in_function_body_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2021, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Check that annotations inside function bodies cannot use type arguments, but
+// can be raw.
+
+class C<T> {
+  const C();
+}
+
+void ignore(dynamic value) {}
+
+main() {
+  @C()
+  @C<dynamic>()
+  //^
+  // [analyzer] SYNTACTIC_ERROR.ANNOTATION_WITH_TYPE_ARGUMENTS
+  // [cfe] An annotation (metadata) can't use type arguments.
+  @C<int>()
+  //^
+  // [analyzer] SYNTACTIC_ERROR.ANNOTATION_WITH_TYPE_ARGUMENTS
+  // [cfe] An annotation (metadata) can't use type arguments.
+  int i = 0;
+  ignore(i);
+}
diff --git a/tools/VERSION b/tools/VERSION
index 718b457..5f9771b 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 13
 PATCH 0
-PRERELEASE 6
+PRERELEASE 7
 PRERELEASE_PATCH 0
\ No newline at end of file