Comment #0 by dlang-bugzilla — 2017-09-18T05:42:32Z
void main()
{
char[2] str = "0123456789abcdef";
}
Comment #1 by b2.temp — 2017-09-18T06:22:19Z
Yes but your example is not a static array initializer. This is a simple non-void initializer that consists of an unary expression converted at run-time.
Better example:
char[2] str = ['0','1','2'];
And actually this is already static cally checked.
Comment #2 by robert.schadek — 2024-12-13T18:54:33Z