The other day my editor was broken. It kept inserting extra parenthenses inside my if condition. Sheesh, but oh well, cannot fix that now, gotta fix this piece of code that for some reason isn't doing what it's supposed to.
Turned out (much later) I had typed =
instead of ==
. Which makes the code formatter insert extra parentheses inside the if expression.
I've been coding for 30 years.