[Issue 11101] Invalid enum member overflow message

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 22 10:54:28 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11101


Maxim Fomin <maxim at maxim-fomin.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxim at maxim-fomin.ru


--- Comment #1 from Maxim Fomin <maxim at maxim-fomin.ru> 2013-09-22 10:54:27 PDT ---
Citing spec: "If the EnumBaseType is not explicitly set, and the first
EnumMember has an initializer, it is set to the type of that initializer.
Otherwise, it defaults to type int." 

Since second enum is not explicitly based on int and has first enum
initializer, that's why type of second enum is deduced to be GTokenType and
overflow occures as the first enum has single member. So, according to current
spec this is RESOLVED-INVALID. 

On the other hand, nothing stops from allowing such code for facilitation
purposes by fixing spec.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list