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

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-16T12:04:00Z
Last change time
2012-02-27T11:10:01Z
Keywords
pull
Assigned to
nobody
Creator
sandford

Comments

Comment #0 by sandford — 2012-02-16T12:04:41Z
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 by sandford — 2012-02-16T12:10:20Z
Comment #2 by github-bugzilla — 2012-02-16T12:31:22Z
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.