Array initialization - compiler error

genie sgenie at maxnet.co.nz
Thu Nov 23 15:37:26 PST 2006


I just found out that the (incorrect) initialization of an array:

int[] a={1,2,3};

causes the compiler (DMD, latest build) to assert:

Assertion failure: '0' on line 219 in file 'init.c'
abnormal program termination

rather than report an error.

surely, changing the line to:
int[] a=[1,2,3];

fixed it.



More information about the Digitalmars-d-bugs mailing list