I see these rules but when I compile following code and it fails with error it looks VERY stupid.

import std.stdio;

void main()
{
        ubyte a = 15;
        ubyte b = 10;
        
ubyte c = a + b; //What is happening there?! AAAAARGH! Are you joking?!
        
}

Compilation output:
/d837/f382.d(9): Error: cannot implicitly convert expression (cast(int)a + cast(int)b) of type int to ubyte

I'm just crazy about it! How could it happen?!

I just should forget about all integer type except *int*, because it make my head just explode!!!

Reply via email to