The following code will cause a error: Error: cannot implicitly convert expression ([2,3,4]) of type int[3] to ubyte ubyte a[3] = [2, 3 ,4];
That worked for me. Windows XP SP2, DMD 1.007 ----------------- c:\temp>type test.d ubyte a[3] = [2, 3 ,4]; void main(){} c:\temp>dmd test.d c:\dmd\bin\..\..\dm\bin\link.exe test,,,user32+kernel32/noi; c:\temp>dmd Digital Mars D Compiler v1.007 ---------------
It cannot works: void main(){ ubyte a[3] = [2, 3 ,4]; }
This was still failing in DMD1.020, but was fixed by 1.041.