Skip to content

Dartdoc does not narrow parameter types in descendants #31020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alsemenov opened this issue Oct 6, 2017 · 2 comments
Closed

Dartdoc does not narrow parameter types in descendants #31020

alsemenov opened this issue Oct 6, 2017 · 2 comments

Comments

@alsemenov
Copy link
Contributor

Lets consider class dart:io:Socket as an example. Its description reads:

abstract class Socket
Implements Stream<List<int>>, IOSink

Lets look at the methods and properties of the class Socket
On the front page:

first → Future<List<int>>
Returns the first element of the stream.
read-only, inherited

Following the link:

Future<T> first
Returns the first element of the stream.

Stops listening to the stream after the first element has been received.

Please, note that <List<int>> is now replaced by T, which is confusing.
The same situation is observed for property last.

For methods situation is a bit different. On the front page:

distinct([bool equals(T previous, T next) ]) → Stream<List<int>>
Skips data events if they are equal to the previous data event.
inherited

Following the link:

Stream<T> distinct([bool equals(T previous, T next ) ])
Skips data events if they are equal to the previous data event.

Please, notice that parameter type T is replaced wih actual type sometimes.

pipe(StreamConsumer<List<int>> streamConsumer) → Future
Pipe the events of this stream into streamConsumer.
inherited

@anders-sandholm
Copy link
Contributor

@alsemenov, thanks for filing the issue.
Dartdoc has it's own issue tracker at https://github.com/dart-lang/dartdoc/issues.
I'll move the issue over there.

@anders-sandholm
Copy link
Contributor

This issue was moved to dart-lang/dartdoc#1512

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants