http://d.puremagic.com/issues/show_bug.cgi?id=3147
Summary: Incorrect value range propagation for addition Product: D Version: unspecified Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: and...@metalanguage.com This code doesn't compile and it should: void main() { byte x, y, z; short a = x+y; } Although the manifest type of x+y is int, the actual range of x+y, regardless of the values of x and y, is -byte.min-byte.min to byte.max+byte.max. That range fits properly in a short so the compiler should let the code go through. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------