Skip to content

dartdoc is dropping type parameters from implements clause, other places #1514

@jcollins-g

Description

@jcollins-g

Discovered while researching #1512: Some changes in #1509 (https://github.com/dart-lang/dartdoc/blame/master/lib/src/element_type.dart#L80) tweaked the heuristic (necessary due to dart-lang/sdk#30998) we use to determine whether to display type parameters. It appears while I improved things for generic functions, I regressed them in more common cases.

Compare return type of 'distinct' on:
https://api.dartlang.org/stable/1.24.2/dart-io/Socket-class.html
vs
https://api.dartlang.org/be/150864/dart-io/Socket-class.html

Since the new dartdoc drops the type parameter, it implies the return type's 'Stream<T>' is related to the type parameter for Socket. But it really isn't, it was explicitly specified in the 'implements' clause as List<int>.

P1 since it has high impact (implies something that is not true about the return type, with no way to tell besides looking at source code that it might be wrong).

Metadata

Metadata

Assignees

Labels

P1A high priority bug; for example, a single project is unusable or has many test failures

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions