Skip to content
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

Documentation missing template type in inherited classes #18571

Closed
andersjohnsen opened this issue May 1, 2014 · 6 comments
Closed

Documentation missing template type in inherited classes #18571

andersjohnsen opened this issue May 1, 2014 · 6 comments
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. closed-duplicate Closed in favor of an existing report

Comments

@andersjohnsen
Copy link

A HttpRequest in dart:io is defined as:

  abstract class HttpRequest implements Stream<List<int>> {

but the dartdoc days:

  Implements: Stream Extends: Object

https://api.dartlang.org/apidocs/channels/be/dartdoc-viewer/dart-io.HttpRequest

@lrhn
Copy link
Member

lrhn commented May 1, 2014

Added Area-Pkg label.

@iposva-google
Copy link
Contributor

The problem actually goes deeper. For example take a look at https://api.dartlang.org/apidocs/channels/be/dartdoc-viewer/dart-io.HttpServer#id_listen

This is the function definition listed:
StreamSubscription<T> listen(Function onData, {bool cancelOnError, Function onDone, Function onError})

There are multiple things wrong with this:

  • The StreamSubscription should be properly typed here as there is no T type parameter within HttpRequest.
  • Within the Stream class listen has the following parameter list:
      (void onData(T event), { Function onError, void onDone(), bool cancelOnError})
      You'll note that the first parameter is a typed function expecting a particular parameter type, but this gets dropped in the documentation.

@iposva-google
Copy link
Contributor

cc @sethladd.

@kevmoo
Copy link
Member

kevmoo commented May 2, 2014

Changed the title to: "Documentation missing template type in inherited classes".

@efortuna
Copy link
Contributor

efortuna commented May 8, 2014

The function issue that Ivan mentions has been fixed

@efortuna
Copy link
Contributor

efortuna commented May 9, 2014

Added Duplicate label.
Marked as being merged into #16145.

@andersjohnsen andersjohnsen added Type-Defect area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. closed-duplicate Closed in favor of an existing report labels May 9, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. closed-duplicate Closed in favor of an existing report
Projects
None yet
Development

No branches or pull requests

5 participants