Value Range Propagation

Michal Minich michal.minich at gmail.com
Wed Feb 23 00:52:14 PST 2011


V Tue, 22 Feb 2011 22:23:32 -0800, Walter Bright wrote:

> http://ddj.com/blog/archives/2011/02/value_range_pro.html

This case is missed. The result must be always in range of ubyte.

ubyte ub;
ubyte a = 255 - ub; // Error: cannot implicitly convert expression 
                    // (255 - cast(int)ub) of type int to ubyte


More information about the Digitalmars-d mailing list