initializer for array of function literals

Adrian Matoga epi at atari8.info
Sat Oct 30 18:38:40 PDT 2010


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


More information about the Digitalmars-d-learn mailing list