[Issue 2006] New: Appending empty array using ~= doesn't work

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 18 09:39:02 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2006

           Summary: Appending empty array using ~= doesn't work
           Product: D
           Version: 2.012
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: bartosz at relisoft.com


I have an empty array of arrays of string aas. I append to it an empty array of
string. The result should be an array aas of length one. 

string [][] aas = [];
aas ~= cast (string []) [];
writefln ("%d", aas.length);
aas = aas ~ cast (string []) [];
writefln ("%d", aas.length);

It works correctly when using assignment and concatenation, but id doesn't when
using the combined operator ~=. In the latter case, the length of array remains
zero.


-- 



More information about the Digitalmars-d-bugs mailing list