https://issues.dlang.org/show_bug.cgi?id=20520

Iain Buclaw <ibuc...@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuc...@gdcproject.org

--- Comment #6 from Iain Buclaw <ibuc...@gdcproject.org> ---
(In reply to Walter Bright from comment #5)
> Razvan is right. This should not compile. An enum's value should evaluate to
> a constant, not a pointer to the heap.
> 
> Just like this does not compile:
> 
>     class C { }
>     C x = new C();
It's an rodata constant, you support it in the same way that

   static C x = new C();

is supported.

--

Reply via email to