Ticket #369 (new defect)
Assigning values to enums out-of-order does not work
Reported by: | NoshBar | Owned by: | |
---|---|---|---|
Priority: | medium | Milestone: | |
Component: | Cobra Compiler | Version: | 0.9.6 |
Keywords: | enum | Cc: |
Description
This may be an abuse of enums, but I am setting up some default values in my app through the use of enums, and I noticed that assigning them values directly does not work if they are not in numerical order. I do not receive a warning or error during compilation.
e.g.,
class Test
..enum Defaults
....HalfAMillion = 500000,
....Zero = 0
..def main
....print Defaults.Zero to int #actually prints 500001
Change History
Note: See
TracTickets for help on using
tickets.