https://issues.dlang.org/show_bug.cgi?id=8901
Ate Eskola <ajiesk...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |ajiesk...@gmail.com Resolution|INVALID |--- --- Comment #6 from Ate Eskola <ajiesk...@gmail.com> --- I was just bitten by this one. Test case: ------------------ void main() { import std.stdio; // Excepted: 1 on big endian machine, 0 on little endian machine // Got: Error: array index 3 is out of bounds `[cast(ubyte)1u][0 .. 1] (cast(ubyte[]) [1])[3].writeln(); } ------------------ Maybe this is behaving as intended, but if so, I'm unable to find the spec rule that says so. Instead https://dlang.org/spec/expression.html#array_literals says that array literals are dynamic arrays of common type of their element. Reopening until the spec and implementation match. --