Warn about do nothing expressions?

Benjamin Thaut code at benjamin-thaut.de
Fri Mar 28 09:54:51 PDT 2014


I had a bug which came down to the following line today:

m_takeIndex = m_takeIndex++;

Actually this line does nothing. m_takeIndex remains at exactly the same 
value as before (tested with dmd 2.065).

Can someone please explain why? And would be suitable to warn about 
this, if it is correct behaviour?

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d mailing list