Please tell me this is a bug?

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Sun Feb 22 03:03:50 PST 2015


"deadalnix"  wrote in message news:wzpgqlnevhdmhsylumyq at forum.dlang.org...

> The rationale make sens for things like :
> byte a; a += 1;
>
> Here, because of type promotion, a + 1 is an int, and if VRP of a is 
> unknown, you can't cast implicitly back to byte.
>
> It is true that this create questionable side effect for float, but in the 
> end, that is consistent, and it would be very annoying to not be able to 
> increment/decrement integral smaller than int.

We would still be able to accept that case if we required that the rhs 
implicitly converted to the rhs. 



More information about the Digitalmars-d mailing list