You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently tags always use 0 ... N, where N is the number of tag variants, as the discriminant values.
This makes them useless for modeling C enums, which they are the natural analogue of. We should support a form of variant-declarator that provides a discriminant value, as (say) an uint const expression or something.
Ideal sort of example:
tag color {
red = 0xff;
blue = 0xfe;
}
It'd also be nice to be able to cast back and forth against uint values, and similar "like in C" enum tricks. But one thing at a time.