Andrej Mitrovic Wrote:

> // Works
> enum : int[string]
> {
>     Circle = ["CoolCircle":50]
> }    
> 
> //  Error: non-constant expression ["CoolCircle":50]
> enum shapes : int[string]
> {
>     Circle = ["CoolCircle":50]
> }
> 
> I can't find this in bugzilla.

I believe it is because

shapes.Circle["CoolCircle"] = 25;

perhaps a a defining:

enmu shapes : const(int[string])

would work?

Anyway with DMD 2.052 I'm not getting your error.

Reply via email to