[Issue 6286] Static arrays can not be assigned from const(T)[N] to T[N]
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jul 11 02:10:41 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6286
Jonathan M Davis <jmdavisProg at gmx.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jmdavisProg at gmx.com
--- Comment #1 from Jonathan M Davis <jmdavisProg at gmx.com> 2011-07-11 02:05:28 PDT ---
I don't think that this is a bug but rather than dmd used to be buggy with
regards to this case.
dst = src;
is assigning src to dst. And assigning a dynamic array to a static one isn't
legal. If
dst = src;
were allowed, then it would be inconsistent with the case where both dst and
src are dynamic arrays.
dst[] = src[];
on the other hand is specifically copying the elements of src to the elements
of dst. So, it's possible that this is a regression and that
dst = src;
is supposed to just translate to
dst[] = src[];
when dst is a static array, but I think that it's far more likely that this is
a case where a long-standing bug was fixed.
--
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