Ticket #310 (new enhancement)
enum check on compilation
Reported by: | kobi7 | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Cobra Compiler | Version: | 0.8.0 |
Keywords: | Cc: |
Description
I would like to suggest a feature request:
when branching on an enum, I would like to get a warning if I omit in the 'on' cases one of the enum fields.
one warning for each field.
even if I have an 'else' case.
This is very useful when adding another field, it will let me know all the places in code that I should update.
((the current alternative is throwing a notsupported or notimplemented exception on the else case, which is then more easily discovered. or assert false in that position. however this is on runtime.))
Change History
Note: See
TracTickets for help on using
tickets.