June 12, 2011
Jonathan M Davis wrote:
> On 2011-06-12 02:37, bearophile wrote:
>> Jonathan M Davis:
>>> Certainly, once range propagation has been fully implemented, this
>>> particular will work without needing any casts, but as soon as the
>>> compiler doesn't know what the values of x and y are, I believe that it
>>> would still end up complaining.
>> I am not sure D range propagation is supposed to work across different
>> lines of code (I think not).
> 
> I'm pretty sure that it is (it wouldn't be worth much if it didn't IMHO), but I'd have to look up discussions on it to be sure.
> 
> - Jonathan M Davis
Bearophile is right. It only applies to single expressions. (Using more than one statement requires flow analysis).
1 2
Next ›   Last »