initializer for array of function literals
Don
nospam at nospam.com
Sat Oct 30 20:39:12 PDT 2010
Adrian Matoga wrote:
> Hello,
>
> I would appreciate if somebody explained to me why this code:
>
> static void function(int a)[] foo = [ function (int a) { } ];
>
> causes the following compile error:
>
> test.d(2): Error: non-constant expression __funcliteral1
>
> (DMD 2.050, Windows7)
>
> TIA
>
> --
> Adrian
I think that's a bug. I can't think of any reason why that shouldn't work.
More information about the Digitalmars-d-learn
mailing list