dart-lang/dartdoc

package:collection's classes are missing "Implemented types"

srawlins opened this issue · 3 comments

See DelegatingIterable, which indirectly implements Iterable:

class DelegatingIterable<E> extends _DelegatingIterableBase<E> { ... }
abstract class _DelegatingIterableBase<E> implements Iterable<E> { ... }

vs DelegatingList, which directly implements List:

class DelegatingList<E> extends _DelegatingIterableBase<E> implements List<E> { ... }
abstract class _DelegatingIterableBase<E> implements Iterable<E> { ... }

It should be displayed that DelegatingIterable implements Iterable, even though it is indirect.

@kevmoo if you have a minute, I'd love your opinion.

The issue is that DelegatingIterable extends (not implements) _DelegatingIterableBase, which then implements Iterable. I really think this is 100% beside any point; it's an implementation detail. From the consumer's perspective, DelegatingIterable implements Iterable, and we should document it as such.

kevmoo commented

Great question, @srawlins

My gut here: there should always be a path to all implemented interfaces. But I think it's fine if the route is indirect.

Might be worth seeing what other platforms do: C#, Java, etc

Fixed; I forget when.