www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20639] New: Some BitArray methods should be

https://issues.dlang.org/show_bug.cgi?id=20639

          Issue ID: 20639
           Summary: Some BitArray methods should be const/pure/nothrow/...
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: moonlightsentinel disroot.org

The following code gives various errors regarding pure/nothrow/... because
these methods are missing appropriate annotations:

-----------------
import std.bitmanip : BitArray;

void main()  nogc pure nothrow
{
    BitArray b;
    b[] = true;
    b[0..1] = true;
    b.flip();
    b.count();
}
------------------

--
Mar 05 2020