Yes but I think he is saying that if the left/what you compare to is not a constant then it will not warn you (if the type agrees, as it should anyway for a comparison).
If you're doing
if (var1 == var2)
then yoda expressions won't save you, however.