Fix test_unresolved_annotation_instanceCreation_argument_super.

R=brianwilkerson@google.com

Change-Id: I6a70d9766fe90fc9eb4b7783a3c897c849a1652e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99445
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index c759288..f2db8f0 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -7147,16 +7147,6 @@
   }
 
   @override
-  DartType get returnType {
-//    if (linkedNode != null) {
-//      return enclosingUnit.linkedContext.getType(
-//        linkedNode.methodDeclaration_returnType2,
-//      );
-//    }
-    return super.returnType;
-  }
-
-  @override
   T accept<T>(ElementVisitor<T> visitor) => visitor.visitMethodElement(this);
 
   @override
@@ -9556,9 +9546,6 @@
   DartObject get constantValue => evaluationResult?.value;
 
   void set declaredType(DartType type) {
-//    if (linkedNode != null) {
-//      enclosingUnit.linkedContext.setVariableType(linkedNode, type);
-//    }
     _declaredType = _checkElementOfType(type);
   }
 
diff --git a/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart b/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
index f93c8ad..b64ab66 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
@@ -159,12 +159,6 @@
     await super.test_syntheticFunctionType_genericClosure();
   }
 
-  @override
-  @failingTest
-  test_unresolved_annotation_instanceCreation_argument_super() async {
-    await super.test_unresolved_annotation_instanceCreation_argument_super();
-  }
-
   void _addLibraryUnits(
     Source definingSource,
     CompilationUnit definingUnit,
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index ef64d9c..381cad8 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -9556,9 +9556,7 @@
 ''');
   }
 
-  @failingTest
   test_unresolved_annotation_instanceCreation_argument_super() async {
-    // TODO(scheglov) fix https://github.com/dart-lang/sdk/issues/28553
     var library = await checkLibrary('''
 class A {
   const A(_);
@@ -9569,11 +9567,11 @@
 ''', allowErrors: true);
     checkElementText(library, r'''
 class A {
-  A(_);
+  const A(dynamic _);
 }
-
+@
+        A/*location: test.dart;A*/(super)
 class C {
-  synthetic C();
 }
 ''');
   }