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


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugd...@yahoo.com.au
          Component|Phobos                      |DMD
            Summary|BigInt array slice int      |array slice assignment
                   |assignment                  |should check for opAssign


--- Comment #1 from Don <clugd...@yahoo.com.au> 2012-06-13 05:03:17 PDT ---
This doesn't have anything to do with BigInt. Rather, it's a request for
implicit conversion to apply to array block assignment.

Reduced example:

struct S
{
   void opAssign(int n) {}
}

void main()
{
   S[20] s;
   s[] = 6;
}

bug.d(9): Error: cannot implicitly convert expression (6) of type int to S[]

It seems reasonable enough. It could be problematic if the thing being assigned
is an array, eg

void opAssign(int[] n) {}

but we have that problem already with block assignment to arrays of dynamic
arrays.

AFAIK array block assignment isn't mentioned in the spec at all.

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

Reply via email to