bearophile schrieb:
> What's wrong with just (D2 code):
> short[] a3 = [5, 3];
>
Nothing, but it's just the stripped down example.
auto t = [0xFF, 0x00];
yields int[]
so for
struct Foo {
...}
auto x = cast(Foo[]) [0x00, 0x01,...];
you need an additional cast(ubyte[]).
Yet this doesn't work:
http://codepad.org/P9EZ0dIB