[analyzer] simplify AbstractClassElementImpl.supertype

Change-Id: I68eda760a8e55b537d5acbc1c62bfe29e4a32309
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300142
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: 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 d615228..8d80404 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -62,7 +62,8 @@
     with TypeParameterizedElementMixin, HasCompletionData, MacroTargetElement
     implements InterfaceElement {
   /// The superclass of the class, or `null` for [Object].
-  InterfaceType? _supertype;
+  @override
+  InterfaceType? supertype;
 
   /// A list containing all of the mixins that are applied to the class being
   /// extended in order to derive the superclass of this class.
@@ -191,21 +192,6 @@
   }
 
   @override
-  InterfaceType? get supertype {
-    if (_supertype != null) return _supertype!;
-
-    if (hasModifier(Modifier.DART_CORE_OBJECT)) {
-      return null;
-    }
-
-    return _supertype;
-  }
-
-  set supertype(InterfaceType? supertype) {
-    _supertype = supertype;
-  }
-
-  @override
   InterfaceType get thisType {
     if (_thisType == null) {
       List<DartType> typeArguments;