[Issue 10480] Warning against wrong usage of incorrect operator for bits set test

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 27 05:40:03 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10480


yebblies <yebblies at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |yebblies at gmail.com
         Resolution|WONTFIX                     |


--- Comment #4 from yebblies <yebblies at gmail.com> 2013-06-27 22:39:58 EST ---
I'm not seeing the problem with this here...

I agree with Walter, this should be allowed, it happens all the time.
if (0 && anything)

Same with this:
if (1 || anything)

But this...?
if (1 | anything)

At best, they meant to write ||, and this is a typo.
At worst, it was supposed to be an && and this is a bug.

I think an error here would be very unlikely to be a false positive.

I can't think of a single use for a logical or expression as a condition.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list