D-Programming-Language/dmd — pull request #1228 by donc (2012-10-27 07:31:07+00:00)
Title: CTFE: reduce memory use for arr.length = n

Fix one of the few remaining cases where there was a useless complete array creation in CTFE.
If 'arr' was a slice of another array, eg arr == x[lo..hi] then
arr.length = n
would first do new arr= x[lo..hi].dup // this is what resolveSlice() does.
and then copy the elements into the new array literal for arr.
This pull request removes that first, useless array literal creation.