Why there is too many uneccessary casts?

Temtaime temtaime at gmail.com
Tue Jun 11 03:12:25 PDT 2013


ubyte k = 10;
ubyte c = k + 1;

This code fails to compile because of: Error: cannot implicitly 
convert expression (cast(int)k + 1) of type int to ubyte

Why? It's pain in the ass, i think. My code contains only casts 
then.


More information about the Digitalmars-d-learn mailing list