On Sun, 28 Sep 2014 22:33:40 +0100 Stewart Gordon via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote:
> You can do `new ubyte[256][256]`, if the destination type is a > ubyte[256][]. The reason is that you are performing an allocation of > the form `new T[n]`, which means allocate an array of n instances of > type T. In this case, T is ubyte[256], which is a static array type. it's completely counterintuitive. either `new ubyte[256];` should be disallowed, or `new ubyte[256][256];` should work as i expect it to work. it's the same thing as with const methods: `const A foo ()`. yes, 'const' is a method attribute here, but it's counterintuitive.
signature.asc
Description: PGP signature