Summary: array casts behave differently at compile and runtime
This is related to casts of arrays not being documented:
The issue is that the following produce different results:
const short ct = cast(short) [cast(byte)1, 1]; // ct is [1, 1]
short rt = cast(short) [cast(byte)1, 1].dup; // rt is [ 257 ]
The runtime cast seems to be defined as 'reinterpret the data as an array of a
different type, recompute the length' whereas the compile time cast seems to be
'convert each element to the other element type, keep length unchanged'.