Skip to content

First class functions are missing generic type parameters in API #3452

Closed
@nshahan

Description

@nshahan

I noticed this when looking at the docs for package:dart_internal. For example look at extractIterableTypeArgument

Notice how in the signature at the top the function parameter is displayed in the old format and is missing its generic type parameter:

extractIterableTypeArgument(Iterable iterable, Object? extract()) → Object?

While in the implementation you can see the newer function type syntax and the type parameter:

Object? extractIterableTypeArgument(
        Iterable iterable, Object? Function<T>() extract) =>
    internal.extractTypeArguments<Iterable>(iterable, extract);

This issue appears on the main API page as well:
https://pub.dev/documentation/dart_internal/latest/extract_type_arguments/extract_type_arguments-library.html

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work ontype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions