On 10/24/2011 12:03 AM, Nick Sabalausky wrote:
This worked on 2.055, but the 2.056 beta gives "dupImmutable.d(9): Error: cannot implicitly convert element type immutable(Bar) to mutable in iarr.dup":

struct Bar
{
   int[] b;
}

void main()
{
   immutable Bar[] iarr = [];
   Bar[] arr = iarr.dup;
}

I *think* that's a bugfix (6695 maybe?) and not a regression, but I wanted to double-check.



Here iarr.dup is returning an immutable array, which is then attempted to cast to the type of arr which is mutable. Hence the error.
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

Reply via email to