[Issue 2351] enum with no members allowed

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 26 05:30:00 PST 2010


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



--- Comment #4 from Jerry Quinn <jlquinn at optonline.net> 2010-02-26 05:29:58 PST ---
(In reply to comment #3)
> So the meaning of that code changes from declaring an enum type with no members
> to declaring a manifest constant with value 0.

That seems more reasonable to me.  However, if you specify a type as well, DMD
rejects it:

enum long a;

enum1.d(1): Error: variable enum1.a manifest constants must have initializers

So at the moment it is inconsistent.

-- 
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