Skip to content

ParameterElementImpls returned from GenericFunctionTypeElement's parameters method always return as equal to each other #30146

Description

@jcollins-g

In the case where GenericFunctionTypeElement is being used in a new style generic function type declaration, e.g.:

/// A typedef with the new style generic function syntax.
typedef NewGenericTypedef<T> = List<S> Function<S>(T, int, bool);

the corresponding GenericFunctionTypeElement correctly generates three different parameter objects, one each for T, int, and bool.

However, each of them have the same hashCode and compare as equal to each other, which can confuse dartdoc's internal object cache. This results in all three looking like 'T'.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestanalyzer-apiIssues that impact the public API of the analyzer packagearea-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.type-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