Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'upstream/stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinNowak committed Apr 20, 2015
2 parents e8aa524 + eeb01a6 commit 7331dc3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/gc/gc.d
Expand Up @@ -3172,6 +3172,7 @@ struct SmallObjectPool

info.base = cast(void*)((cast(size_t)p) & notbinsize[bin]);
info.size = binsize[bin];
offset = info.base - baseAddr;
info.attr = getBits(cast(size_t)(offset >> shiftBy));

return info;
Expand Down Expand Up @@ -3259,6 +3260,14 @@ struct SmallObjectPool
}
}

unittest // bugzilla 14467
{
int[] arr = new int[10];
assert(arr.capacity);
arr = arr[$..$];
assert(arr.capacity);
}

/* ============================ SENTINEL =============================== */


Expand Down

0 comments on commit 7331dc3

Please sign in to comment.