[Issue 4521] Array-wise assignment on unallocated array is accepted

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 28 06:38:09 PDT 2010


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



--- Comment #5 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2010-07-28 06:38:07 PDT ---
Actually I think I'm confusing myself with how dynamic allocation works. I
thought the dynamic array always have to be called with new, but it appears I
can change the length of an array without calling new in the first place, e.g.:

    int[] a;
    a.length = 4;
    a[] = 4;
    writeln(a);   // writes 4 4 4 4

So this should probably get closed. Sorry for the confusion.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list