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 756fec6a6a8717a6b4a68f657b9443f85e1d48f3..8d141146ba97c396f4feb27ac5fa2336b46576a1 100644 |
--- a/pkg/analyzer/lib/src/dart/element/element.dart |
+++ b/pkg/analyzer/lib/src/dart/element/element.dart |
@@ -746,12 +746,19 @@ class ClassElementImpl extends AbstractClassElementImpl |
@override |
List<InterfaceType> get interfaces { |
- if (_unlinkedClass != null && _interfaces == null) { |
- ResynthesizerContext context = enclosingUnit.resynthesizerContext; |
- _interfaces = _unlinkedClass.interfaces |
- .map((EntityRef t) => context.resolveTypeRef(this, t)) |
- .where(_isClassInterfaceType) |
- .toList(growable: false); |
+ if (_interfaces == null) { |
+ if (_kernel != null) { |
+ _interfaces = _kernel.implementedTypes |
+ .map((k) => enclosingUnit._kernelContext.getInterfaceType(this, k)) |
+ .toList(growable: false); |
+ } |
+ if (_unlinkedClass != null) { |
+ ResynthesizerContext context = enclosingUnit.resynthesizerContext; |
+ _interfaces = _unlinkedClass.interfaces |
+ .map((EntityRef t) => context.resolveTypeRef(this, t)) |
+ .where(_isClassInterfaceType) |
+ .toList(growable: false); |
+ } |
} |
return _interfaces ?? const <InterfaceType>[]; |
} |