Open kiljacken opened 8 years ago
It occured to me that it would be useful to be able to specify hte size of a enum. We'd of course need a new syntax for this. I propose the following:
type Thing enum : u8 { A = 50, B, C, }
In the case of simple enums it would simply be the size of the type, in case of a union enum it would be the size of the tag.
To go with this we'd probably need a semantic check for overflow of enum members.
It occured to me that it would be useful to be able to specify hte size of a enum. We'd of course need a new syntax for this. I propose the following:
In the case of simple enums it would simply be the size of the type, in case of a union enum it would be the size of the tag.
To go with this we'd probably need a semantic check for overflow of enum members.