[Issue 14467] New: arr.capacity sometimes erroneously returns 0
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Apr 19 19:21:17 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14467
Issue ID: 14467
Summary: arr.capacity sometimes erroneously returns 0
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: regression
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: schveiguy at yahoo.com
Works in 2.066.1, fails in 2.067:
void main()
{
auto arr = new int[10];
assert(arr.capacity == 15);
arr = arr[5..$];
assert(arr.capacity == 10);
}
I'll take a look at the code, see if I can figure out the fix.
--
More information about the Digitalmars-d-bugs
mailing list