www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4123] New: BitArray this() with length

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 puremagic.com
        ReportedBy: bearophile_hugs eml.cc


--- Comment #0 from bearophile_hugs 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: -------
Apr 24 2010