https://issues.dlang.org/show_bug.cgi?id=20240
Issue ID: 20240 Summary: BitArray inconsistently preserves bits past length Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P4 Component: phobos Assignee: dlang-bugzi...@thecybershadow.net Reporter: dlang-bugzi...@thecybershadow.net //////////// test.d /////////// import std.bitmanip; void main() { BitArray ba; ba.length = 1; ba[0] = 1; ba.length = 0; ba.length = 1; assert(ba[0] == 0); // OK ba.length = 2; ba[1] = 1; ba.length = 1; ba.length = 2; assert(ba[1] == 0); // Fail } /////////////////////////////// --