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

Typecheck const generics #1351

Open
1 of 5 tasks
CohenArthur opened this issue Jun 30, 2022 · 0 comments
Open
1 of 5 tasks

Typecheck const generics #1351

CohenArthur opened this issue Jun 30, 2022 · 0 comments

Comments

@CohenArthur
Copy link
Member

CohenArthur commented Jun 30, 2022

I don't think const generic parameters should be typechecked during top-level. They do not "declare" a type, but they use one (const N: usize). So they should only be typechecked when items are typechecked. This should be the first change, as generic parameters for items are not used after the TypeCheckTopLevel resolver phase (in functions for example).

Afterwards, once we are sure that the type they reference exists and has been declared, we must check that it is a valid "const generic type" (#1303)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

2 participants