If you look at the C # specifications (in particular, in “Logical Integer Operators”), you will see that for the logical OR operator, there is only a definition for int , uint , long , ulong :
int operator |(int x, int y); uint operator |(uint x, uint y); long operator |(long x, long y); ulong operator |(ulong x, ulong y);
Also in bit-twisting: what does warning CS0675 mean? Eric Lippert claims that:
" int , uint , long and ulong "
there are bitwise or operators
The operator is valid for short , but only in the sense that the short value can be increased to int . However, the return value of this operator is (at least) a int .
So, technically speaking, according to the specifications, this does not seem to be an error, since using |= extends the signed value to int, which gives a warning, and regular | results in int that must be discarded to assign short .
However , since the compiler can really know that both operands are initially short s, both expand to int , and the result will eventually be saved back to short it does not really matter that the operands are expanded. The extension will be lost when pressed from int to short .
Thus, either the VS2013 compiler was smarter with its warnings than VS2015, or VS2015 corrects the error and warns where VS2013 failed. Only the people behind the compiler can answer this, but I assume this is really a mistake (EDIT: and this ).