Steven Schveighoffer <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #4 from Steven Schveighoffer <> 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:
------- You are receiving this mail because: -------

Reply via email to