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


Steven Schveighoffer <schvei...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schvei...@yahoo.com


--- Comment #4 from Steven Schveighoffer <schvei...@yahoo.com> 2012-01-19 
15:05:30 PST ---
(In reply to comment #2)
> To further back up my point, this compiles, and it is not a bug:
> 
> void main(){
>     auto a = [new Object()];
>     auto b = [new Exception("")];
>     a~=b;
> }

It only is not a bug because of the special case of arrays.  That is, even
though the array function takes two mutable arguments, the compiler can deduce
that neither array will be molested (same for concatenation).

The same is not true for normal functions, you could not write the append
function in user code that accepted a derived array type without applying
const/inout to the second argument.

I agree it's not a bug, but is an enhancement.  It would also be a good
brainstorming session to figure out how to employ the same assumptions on
normal functions.

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

Reply via email to