Skip to content
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

Missing documentation for generics in methods #600

Open
beta-ziliani opened this issue Mar 31, 2022 · 2 comments
Open

Missing documentation for generics in methods #600

beta-ziliani opened this issue Mar 31, 2022 · 2 comments

Comments

@beta-ziliani
Copy link
Member

beta-ziliani commented Mar 31, 2022

When looking to understand type variables in a function, for instance:

def func(x : A) forall A
end

It's intuitive to go to the Generics section. However, there isn't any mention of this in that section, and instead you need to go to Free variables. It'd be nice to add a reference.

@Blacksmoke16
Copy link
Member

FWIW its in the Free variables section, so could at least just link to https://crystal-lang.org/reference/1.3/syntax_and_semantics/type_restrictions.html#free-variables.

@beta-ziliani
Copy link
Member Author

D'oh 🤦 ! I'll edit it appropriately. Thanks!

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

No branches or pull requests

2 participants