Implicit cast to immutable

bearophile bearophileHUGS at lycos.com
Thu Oct 6 05:31:18 PDT 2011


Christophe:

> That is very consistent, so I don't think this 
> should be considered as a bug. There may be an improvement to ask to 
> make the compiler able to check when the cast to immutable is safe, but 
> I don't think there is a bug.

The compiler already performs such checks, in this case it answers "no" and I don't understand why, I think it's not the right answer.


> You would need to have pure delegates to have a real effect, wouldn't 
> you ?

The compiler is already able to infer delegate purity, I think.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list