[Issue 7523] New: Incorrect capacity for new T[] with non-zero T.init.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 16 12:04:43 PST 2012


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

           Summary: Incorrect capacity for new T[] with non-zero T.init.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: pull
          Severity: regression
          Priority: P2
         Component: druntime
        AssignedTo: nobody at puremagic.com
        ReportedBy: sandford at jhu.edu


--- Comment #0 from Rob Jacques <sandford at jhu.edu> 2012-02-16 12:04:41 PST ---
auto foo = new float[10];
auto bar = new int[10];

assert(bar.capacity == 15);
assert(foo.capacity == 0, "This should be 15");
assert(foo.capacity == bar.capacity); // fails

-- 
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