Should this be flagged as a warning?

Bernard Helyer b.helyer at gmail.com
Tue Sep 25 14:24:10 PDT 2012


On Tuesday, 25 September 2012 at 19:29:26 UTC, Bernard Helyer 
wrote:
> I tried to post this last night, but the NG wasn't having any 
> of it.
>
> I found myself writing a bug that looked like this
>
>     match(ts, TokenType.Is);
>     match(ts, TokenType.OpenParen);
>     isExp.type == parseType(ts);
>
> The bug being of course, that a type is parsed and ts is 
> modified,
> so the expression has side effects so it's not flagged as a 
> useless
> expression.

Err, the bug is that I wrote '==' instead of '='. That's what
I get for posting first thing in the morning, I guess.


More information about the Digitalmars-d mailing list