Issue ID: 18495
Summary: Integral promotion for a ~ operator
As far as I understand, according to the manual
(https://dlang.org/spec/expression.html#complement_expressions) the bitwise
invertion operator should give a result of the same type as of its operand. But
the code " ubyte d1 = 10; ubyte d2; d2 = ~d1; " gives a strange " Deprecation:
integral promotion not done for '~d1', use '-transition=intpromote' switch or
'~cast(int)d1' " message when compiled.
None of the C compilers I ever used had any issues with that as well. They just
compile with no warnings or errors.
The code compiles and works as expected so it is not a major issue.