Skip to content

Go 1.24 Generic Type Alias #260

@hpidcock

Description

@hpidcock

Requested feature

Go 1.23 introduced generic type aliases behind a GOEXPERIMENTAL flag.
These are now available in Go 1.24. See golang/go#46477
It is desired that mockgen can generate mocks that correctly map generic type params of an
alias to the underlying generic interface type.

Why the feature is needed

When mockgen is given the name of a generic type alias that resolves
to a generic interface, with #217 fixed, it misses the mapping of generic arguments, which might be
references to generic type params from the instantiated generic alias type.

Proposed solution

TBD implements a proposed solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions