msgpack/msgpack-d — pull request #1 by jwhear (2012-01-25 22:35:50+00:00)
Title: Error while unpacking static array

The following fails to compile:
import msgpack;

void main()
{
ubyte[] data;
auto unpacker = Unpacker(data);

char[32] uuid;
unpacker.unpack(uuid);
}

The error is:

msgpack.d(1921): Error: e2ir: cannot cast this.read(length) of type ubyte[] to type char[32LU]

The attached commit resolves this error, by casting then slicing. I'm unsure of the preferred practice for converting from dynamic to static arrays, but this seems to work just fine.