On Monday, 5 September 2016 at 00:26:01 UTC, pineapple wrote:
This program does not compile.Error: cannot implicitly convert expression (cast(int)x - cast(int)x) of type int to ubytevoid main(){ ubyte x; x = x - x; }I don't even know what to say. Who thought this behavior was a good idea?
See the sections 'Integer Promotions' and 'Usual Arithmetic Conversions' in the docs at [1].
[1] http://dlang.org/spec/type.html#integer-promotions