[Issue 10552] Cannot apply access specifiers to individual anonymous enum members

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jul 6 07:08:30 PDT 2013


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



--- Comment #4 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-07-06 07:08:29 PDT ---
(In reply to comment #2)
> (In reply to comment #0)
> > -----
> > enum
> > {
> >     private A = 1,
> >     B = 2,
> > }
> > -----
> > 
> > $ dmd test.d
> > > Error: basic type expected, not private
> 
> I cannot see any benefits there.
> You can just separate public anonymous enum and private one.
> 
> private enum
> {
>     A = 1,
> }
> enum
> {
>     B = 2,
> }

I see it as an unnecessary limitation, each member can have its own type and
its own initializer (even its own UDA), but not an access specifier. Note that
due to Issue 10552 we can use neither syntax.

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