Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Generic parameters should be rendered in a different color than ordinary type aliases, and hyperlink to the parameter definition. #2322

Closed
Oblarg opened this issue Jun 29, 2023 · 2 comments
Labels
help wanted Contributions are especially encouraged

Comments

@Oblarg
Copy link

Oblarg commented Jun 29, 2023

Currently, generic parameters render in function/object documentation with the same formatting as links to type aliases (i.e. red-colored text), but are not links at all. This can be confusing, especially in the case of a nontemplated member function of a templated class, where the parameter occurs without any obvious context to indicate that it is a generic parameter.

These should be links to the corresponding entry in the "type parameter" section (or just to the "type parameter" section itself if that's not easy/possible), and should render in a different color.

@Oblarg Oblarg added the enhancement Improved functionality label Jun 29, 2023
@Gerrit0 Gerrit0 added the help wanted Contributions are especially encouraged label Jun 30, 2023
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jun 30, 2023

Tricky part of doing this is the notExported warnings - requires a rework of how type parameters are handled.

need to consider how infer X is handled as it is, according to the compiler api, a type parameter.

@Oblarg
Copy link
Author

Oblarg commented Jun 30, 2023

My feeling is that infer X is a type parameter, just one whose value has been inferred based on another provided parameter, and that linking to the type parameter section would be sufficient (maybe not optimal; it'd be cool if we could have a separate "inferred" section eventually).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
help wanted Contributions are especially encouraged
Projects
None yet
Development

No branches or pull requests

2 participants