-
Notifications
You must be signed in to change notification settings - Fork 191
Open
Labels
Description
- Check that the type used in const generics has been declared #1360
- Type check default expressions
- Report errors when default expressions are used in const functions or other restricted items Default in const generic parameters are allowed in structs, enums, traits and types #1310
- Type check const arguments against const generic arguments
- Restrict const generic types #1303
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)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo