Skip to content

Add support for generic type aliases#211

Merged
jupblb merged 2 commits intomainfrom
michal/generic-type-alias
Apr 15, 2026
Merged

Add support for generic type aliases#211
jupblb merged 2 commits intomainfrom
michal/generic-type-alias

Conversation

@jupblb
Copy link
Copy Markdown
Member

@jupblb jupblb commented Apr 15, 2026

Fixes #112

jupblb added 2 commits April 15, 2026 17:19
Covers partial instantiation, tighter constraints, chained aliases,
full parameter forwarding, and usage sites.

Issue: #112
Ref: golang/go#46477
formatAliasDeclaration now includes the alias's own type parameter
list (e.g. [K comparable]) on the LHS and the instantiation arguments
(e.g. [K, bool]) on the RHS of the signature documentation.

Two new helpers:
- formatTypeParamList: renders *types.TypeParamList as [K C1, V C2]
- formatTypeArgs: renders *types.TypeList as [K, bool]

Fixes: #112
@jupblb jupblb merged commit c7d2360 into main Apr 15, 2026
5 checks passed
@jupblb jupblb deleted the michal/generic-type-alias branch April 15, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for code navigation for generic type aliases

1 participant