Not if you surround the expression with extra parenthesis. And that's what they did here.
Assignments in if-statement can be useful, and that's how you prevent the compiler from complaining. That warning is intended for honest mistakes, not to catch backdoors.