[Issue 4123] New: BitArray this() with length

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 24 16:14:31 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4123

           Summary: BitArray this() with length
           Product: D
           Version: future
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2010-04-24 16:14:29 PDT ---
Using Phobos with dmd 2.043 this is wrong code, because it initialized the
length field but doesn't actually extend the array.
I think this is a natural syntax that people will want to use, so I suggest to
add this syntax, otherwise I think this will be a cause of bugs in programs.

So this is an enhancement request, but it's borderline with a bug report.


import std.bitmanip: BitArray;
void main() {
    auto b = BitArray(10);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list