What is this behavior and how do I disable or get around it?

pineapple via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Sep 4 17:26:01 PDT 2016


This program does not compile.

Error: cannot implicitly convert expression (cast(int)x - 
cast(int)x) of type int to ubyte

     void main(){
         ubyte x;
         x = x - x;
     }

I don't even know what to say. Who thought this behavior was a 
good idea?



More information about the Digitalmars-d-learn mailing list