digitalmars.D.bugs - [Issue 10749] New: Range value analysis for triple operator too
- d-bugmail puremagic.com (27/27) Aug 03 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10749
http://d.puremagic.com/issues/show_bug.cgi?id=10749 Summary: Range value analysis for triple operator too Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc void main() { uint x = 6; char digit1 = (x % 10) + '0'; // OK } DMD 2.064alpha gives: test.d(4): Error: cannot implicitly convert expression (x < 10u ? x + 48u : 35u) of type uint to char I think the line with digit2 should compile. (Every useless cast removed from the code reduces the chance of bugs). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 03 2013