immutable bug?

John Colvin john.loughran.colvin at gmail.com
Sat Jan 11 10:52:57 PST 2014


On Saturday, 11 January 2014 at 18:48:15 UTC, Maxim Fomin wrote:
> On Saturday, 11 January 2014 at 18:43:39 UTC, John Colvin wrote:
>>
>> I don't know about the details of what is/isn't legal here, 
>> but the only reason the compiler accepts it is because 
>> filename is marked as pure.
>
> It is legal exactly because function is marked as pure. Result 
> of pure function is implicitly convertible to immutable.

I had heard this mentioned before; is it true in all cases?
Even when the function returns a reference to external data?


More information about the Digitalmars-d mailing list