This is only tested on dmd 2.047 on win7.

According to the spec at http://digitalmars.com/d/2.0/arrays.html:
"Concatenation always creates a copy of its operands, even if one of the operands is a 0 length array"

But this doesn't seem like the case:

        auto a = [0];
        auto oldPtr = a.ptr;
        assert(a.length == 1);
        assert(a.capacity == 3);
        a ~= 1;
        assert(a.ptr != oldPtr); // Fails - Still the same array

Reply via email to