Comment #0 by dlang-bugzilla — 2019-09-25T07:56:27Z
Currently BitArray.this has the peculiar behavior in that it modifies the data referenced from its arguments to clear bits past the specified length. This is documented with a big scary warning in its DDoc. However, I don't see why this behavior is necessary for BitArray to work, as it should never be even accessing bits past its designated length, and it stands in the way of some BitArray applications (i.e. building multiple BitArrays from the same immutable source data but with different length).
Comment #1 by dlang-bot — 2019-09-25T08:03:11Z
@CyberShadow created dlang/phobos pull request #7194 "BitArray fixes" fixing this issue:
- Fix Issue 20242 - BitArray constructor should not modify input data
https://github.com/dlang/phobos/pull/7194
Comment #2 by dlang-bot — 2019-10-05T12:33:46Z
dlang/phobos pull request #7194 "BitArray fixes" was merged into master:
- b808e722b1560292a9905b6930a83571f68cf2ec by Vladimir Panteleev:
Fix Issue 20242 - BitArray constructor should not modify input data
https://github.com/dlang/phobos/pull/7194