Is this a desing rationale? (static array object member)
Janice Caron
caron800 at googlemail.com
Sun Sep 30 02:49:40 PDT 2007
On 9/30/07, Brian Hsu <brianhsu.hsu at gmail.com> wrote:
> Here is my experiment result using DMD 2.004, it seems doesn't mark array literal constant default now, hope it will in future version.
>
><snip>
>
> //OK, all class instance.x point to same array.
> int [] x = [1,1,1,1,1];
Bugger!
Well, I guess D2.0 is experimental and we're beta testing it. I guess
that should be considered a bug. Const should be required, just as it
is with strings.
More information about the Digitalmars-d
mailing list