On Monday, 12 December 2016 at 06:43:52 UTC, Shachar Shemesh wrote:
The following compiles fine:
immutable char[5] array = x"01 02 03 04 05";

[...]

This doesn't seem like a bug:
immutable ubyte[5] array = x"01 02 03 04 05";

This however does:
immutable ubyte[5] array = cast(immutable ubyte []) x"01 02 03 04 05";

There's a workaround for this though.

immutable ubyte[5] array = cast(immutable(ubyte[5]))x"01 02 03 04 05";

Reply via email to