typeImplementations property

Iterable<DartType> typeImplementations

Returns all of the DartType types that this implements, mixes-in, and extends, starting with this itself.

Implementation

Iterable<DartType> get typeImplementations sync* {
  yield this;

  final myType = this;

  if (myType is InterfaceType) {
    yield* myType.interfaces.expand((e) => e.typeImplementations);
    yield* myType.mixins.expand((e) => e.typeImplementations);

    if (myType.superclass != null) {
      yield* myType.superclass!.typeImplementations;
    }
  }
}