[Issue 5540] Probable bug-hiding redundancies
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue May 22 09:45:01 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=5540
Dmitry Olshansky <dmitry.olsh at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dmitry.olsh at gmail.com
--- Comment #8 from Dmitry Olshansky <dmitry.olsh at gmail.com> ---
I think indeed for expressions that are trivially true (or false) there must be
an error in the context of || and &&. x == x and x != x is a popular mistake.
Except for true/false literals as they are often used for debugging and
disabling parts of program explicitly. It's a balancing act but a lot of vlaue
to be had.
On the other hand I'd really just give this to dscanner or simillar lint. I
tried dscanner right now but it doesn't seem to pick it up.
--
More information about the Digitalmars-d-bugs
mailing list