D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7523 - Incorrect capacity for new T[] with non-zero T.init.
Summary: Incorrect capacity for new T[] with non-zero T.init.
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: All All
: P2 regression
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2012-02-16 12:04 UTC by Rob Jacques
Modified: 2012-02-27 11:10 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Rob Jacques 2012-02-16 12:04:41 UTC
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
Comment 1 Rob Jacques 2012-02-16 12:10:20 UTC
Pull request:

https://github.com/D-Programming-Language/druntime/pull/153
Comment 2 github-bugzilla 2012-02-16 12:31:22 UTC
Commits pushed to master at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/8dbdbf8d7ad5bee7526d0fac972c47f15afa2713
This fixes Issue 7523

https://github.com/D-Programming-Language/druntime/commit/0d0c4e3d81b4cea8e10dda2bd3a7b9a9c933f5ca
Merge pull request #153 from sandford/Issue_7523

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