https://issues.dlang.org/show_bug.cgi?id=18134
Issue ID: 18134 Summary: BitArray <<= broken when length % 32 = 0 Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nob...@puremagic.com Reporter: simen.kja...@gmail.com unittest { import std.bitmanip : BitArray; import std.range : repeat; import std.array : array; BitArray ba = true.repeat(64).array; ba >>= 1; assert((cast(uint[])ba)[$-1] == 0x7FFF_FFFF); } When a BitArray covers exactly 32, 64, 96 and so on number of bits, the bit shifting operation fills the last word with zeroes. The test above should pass, but doesn't. --