| Index: pkg/analyzer/lib/src/dart/element/element.dart
|
| diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
|
| index 820a132f4dd188683e1ae12fb7864224d3b777c8..84d7523ced04269d27fd4e2fd58e17436735b50a 100644
|
| --- a/pkg/analyzer/lib/src/dart/element/element.dart
|
| +++ b/pkg/analyzer/lib/src/dart/element/element.dart
|
| @@ -743,6 +743,7 @@ class ClassElementImpl extends AbstractClassElementImpl
|
| ResynthesizerContext context = enclosingUnit.resynthesizerContext;
|
| _interfaces = _unlinkedClass.interfaces
|
| .map((EntityRef t) => context.resolveTypeRef(t, this))
|
| + .where((DartType type) => type is InterfaceType)
|
| .toList(growable: false);
|
| }
|
| return _interfaces ?? const <InterfaceType>[];
|
| @@ -849,6 +850,7 @@ class ClassElementImpl extends AbstractClassElementImpl
|
| ResynthesizerContext context = enclosingUnit.resynthesizerContext;
|
| _mixins = _unlinkedClass.mixins
|
| .map((EntityRef t) => context.resolveTypeRef(t, this))
|
| + .where((DartType type) => type is InterfaceType)
|
| .toList(growable: false);
|
| }
|
| return _mixins ?? const <InterfaceType>[];
|
| @@ -879,8 +881,13 @@ class ClassElementImpl extends AbstractClassElementImpl
|
| InterfaceType get supertype {
|
| if (_unlinkedClass != null && _supertype == null) {
|
| if (_unlinkedClass.supertype != null) {
|
| - _supertype = enclosingUnit.resynthesizerContext
|
| + DartType type = enclosingUnit.resynthesizerContext
|
| .resolveTypeRef(_unlinkedClass.supertype, this);
|
| + if (type is InterfaceType) {
|
| + _supertype = type;
|
| + } else {
|
| + _supertype = context.typeProvider.objectType;
|
| + }
|
| } else if (_unlinkedClass.hasNoSupertype) {
|
| return null;
|
| } else {
|
|
|