[dmd-beta] 2.056 beta 2: Not a regression, right?

Daniel Murphy yebblies at gmail.com
Mon Oct 24 00:17:23 PDT 2011


Yeah, an immutable array of Bar contains an immutable array of int,
whereas mutable would contain mutable, so you can't convert without a
deep dup.

I assume it was fixed by pull 219 for issue 1339.

On Mon, Oct 24, 2011 at 6:03 PM, Nick Sabalausky
<bus_dmdbeta at semitwist.com> 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.
>
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>


More information about the dmd-beta mailing list