http://d.puremagic.com/issues/show_bug.cgi?id=6000
Summary: Value range propagation does not work with modulus (%) with a constant Product: D Version: D2 Platform: Other OS/Version: Mac OS X Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: kenn...@gmail.com --- Comment #0 from kenn...@gmail.com 2011-05-14 08:05:03 PDT --- Test case: --------------------------------- void main() { ulong t; uint v = t & 15; // ok uint u = t % 16; // error? } --------------------------------- x.d(4): Error: cannot implicitly convert expression (t % 16LU) of type ulong to uint --------------------------------- There should not be error. The range of "t % 16" is entirely within [0, 15] which is inside an "uint". (See also bug 3147) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------