No, the issue is simply that the value type part of a slice (i.e. the length 
and the head-immutability of the pointer) can implicitly cast to and from 
immutable.  This is the same as casting an immutable(int)* and a size_t to 
immutable(int *) and immutable(size_t) respectively.


As far as the regression, I'll test momentarily Kenji's pull request that 
reverses the fix for 6912 against dcollections, and if everything builds and 
tests properly, I'd say just reverse that for the release, put it back in, and 
then fix the regression in the main branch for the next cycle.

If that's agreeable, I'll file a bug.  One question, is it good to file 
quick-fix bugs for historical purposes?  I mean I just discovered the bug, it's 
not in a released version yet, and it may be fixed or nullified momentarily.


-Steve



----- Original Message -----
> From: Jason House <[email protected]>
> To: Discuss the dmd beta releases for D <[email protected]>
> Cc: 
> Sent: Friday, December 9, 2011 9:08 AM
> Subject: Re: [dmd-beta] Last (really, this time I mean it!) D2 beta 2.057
> 
>T he special handling of arrays always trip me up. It's strange that 
> immutable(int)[] can initialize immutable(int[]). What's even more bizarre 
> is that immutable(int[]) can be assigned to immutable(int)[]
> 
> Am I unique in the momentary confusion this causes? I think this property is 
> unique to arrays. Can "alias this" cause a similar effect in other 
> types?
> 
> Sent from my iPhone
> 
> On Dec 8, 2011, at 11:50 PM, Walter Bright <[email protected]> wrote:
> 
>>  In any case, there needs to be a bugzilla entry for it.
>> 
>>  On 12/8/2011 7:39 PM, Steve Schveighoffer wrote:
>>>  Still fails my latest mentioned regression:
>>> 
>>>  inout(int[]) foo(inout(int)[] x)
>>>  {
>>>      return x;
>>>  }
>>> 
>>> 
>>>  Error: cannot implicitly convert expression (x) of type inout(int)[] to 
> inout(int[])
>>> 
>>> 
>>>  Given that inout is relatively new to the implementation, I'm not 
> sure how much existing code this breaks.  It certainly breaks dcollections, 
> but 
> I can just instruct people not to use 2.057, and I haven't done a beta 
> release of it since I added the inout decorations.
>>> 
>>>  So it might not be horrible if this goes out.  There is a valid 
> workaround (use a blunt cast).
>>> 
>>>  Again, sorry for the last-minute testing.  I've been busy with work 
> lately.
>>> 
>>>  -Steve
>>> 
>>> 
>>> 
>>>  ----- Original Message -----
>>>>  From: Walter Bright<[email protected]>
>>>>  To: Discuss the dmd beta releases for 
> D<[email protected]>
>>>>  Cc:
>>>>  Sent: Thursday, December 8, 2011 9:47 PM
>>>>  Subject: [dmd-beta] Last (really, this time I mean it!) D2 beta 
> 2.057
>>>> 
>>>>  Includes Kenji's fix (thanks for the super quick response!)
>>>> 
>>>>  http://ftp.digitalmars.com/dmd2beta.zip
>>>>  _______________________________________________
>>>>  dmd-beta mailing list
>>>>  [email protected]
>>>>  http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>>> 
>>>  _______________________________________________
>>>  dmd-beta mailing list
>>>  [email protected]
>>>  http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>> 
>>> 
>>  _______________________________________________
>>  dmd-beta mailing list
>>  [email protected]
>>  http://lists.puremagic.com/mailman/listinfo/dmd-beta
> _______________________________________________
> dmd-beta mailing list
> [email protected]
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
> 
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

Reply via email to