For some more clarity, when I compile the following code:<div><div><br></div><div>void main() {</div><div> import std.stdio;</div><div> byte a;</div><div> byte b;</div><div> byte c = a + b;</div><div>}</div><div><br></div>
</div><div>I get error:</div><div>test.d(6): Error: cannot implicitly convert expression (cast(int)a + cast(int)b) of type int to byte</div><div><br></div><div>Why is D trying to convert bytes and shorts to integers before applying any arithmetic operator?</div>
<div><br></div><div>Regards</div><div>- Puneet</div><div><br></div>