[Issue 5074] array(immutable(int)[]) ==> int[]

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 21 04:59:28 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=5074


yebblies <yebblies at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |yebblies at gmail.com
         Resolution|WONTFIX                     |


--- Comment #7 from yebblies <yebblies at gmail.com> 2014-03-21 22:59:24 EST ---
(In reply to comment #5)
> (In reply to comment #4)
> > However, this would be a change of behavior, which may or may not be an
> > improvement, and may or may not break code.
> 
> It will break code.
> 
> immutable(int)[] a = ...;
> immutable(int)[] b = array(a);
> 
> This breaks if array returns int[].
> 

It doesn't have to!  If array is pure, takes some form of const(int)[], and
returns int[] then the result will implicitly convert to immutable!

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


More information about the Digitalmars-d-bugs mailing list