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


[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #3 from [email protected] 2012-12-02 10:32:59 PST ---
(In reply to comment #2)
> (In reply to comment #0)
> > This is a bug report. I have found two different problems while creating a
> > fixed-sized array as long as the number members of an enum (DMD 2.055beta3)
> 
> All of these now work.

Right, I close this bug report. Issue 4997 covers the enhancement request.


> The problem with this is that lookups also go to the base type of the enum, 
> so:
> 
> struct T
> {
>     @property static size_t length() { return 0; }
> }
> 
> enum Foo : T { a = T() }
> 
> void main()
> {
>     assert(Foo.length == 1);  // fails
> }

Enums already have some built-in attributes, that cause some troubles. In 
Issue 4997 I have suggested a namespace named "meta", so you write
"MyEnum.meta.length". But then a problem is that MyEnum.meta.max breaks the
convention that D integral types have a "max" attribute.

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

Reply via email to