Community
Participate
Working Groups
1. This one is invalid because Betty has no value (this is not meant as an insult to anyone named Betty). enumeration Bad1 Fred = 1, Bob = 2, Nancy = 3, Betty end 2. All of these values are bad (none is an int). enumeration Bad2 Fred = false, Bob = null, Nancy = 12345678901234567890, Betty = "Ha!" end 3. An enumeration with no values should be invalid. enumeration Bad3 end
On second thought, that first case should be valid. If a field hasn't been given a value we'll use its position. So in my example Betty would be 4.
*** Bug 354901 has been marked as a duplicate of this bug. ***
I have added lots of validation to Enumerations. I have also added code to default the int constant value for each entry based on it's definition location. The first entry in the enumeration will have a default value of 1.
The enumeration with no values wasn't marked as invalid. The other problems are fixed. enumeration Bad3 end
I have added the check to disallow enumerations with no fields to EnumerationValidator
Verified.