Skip to content

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

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
nshahan opened this issue Jun 22, 2023 · 1 comment
Closed

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

nshahan opened this issue Jun 22, 2023 · 1 comment
Assignees
Labels
P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@nshahan
Copy link

nshahan commented Jun 22, 2023

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

@srawlins
Copy link
Member

Whoa yikes, great catch.

@srawlins srawlins added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) P2 A bug or feature request we're likely to work on labels Jun 22, 2023
@kallentu kallentu self-assigned this Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants