[Issue 3147] Incorrect value range propagation for addition

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 16 13:42:05 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3147



--- Comment #2 from Sobirari Muhomori <dfj1esp02 at sneakemail.com> 2010-11-16 13:40:52 PST ---
Some asserts for modulus and shifts
---
byte b;
short s;
int i;
long l;
static assert(is(typeof(s%b)==byte));
static assert(is(typeof(i%s)==short));
static assert(is(typeof(b<<b)==int));
static assert(is(typeof(b>>i)==byte));
static assert(is(typeof(b>>>b)==byte));
static assert(is(typeof(b>>l)==byte));
---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list