It's funny that it didn't, as that's the only reason that I caught it.
Except it’s not an error.
CASE 1 + 2 <— You wouldn’t consider this an error, would you? It’s a simple math formula which adds together to become 3. (Though normally you’d see it more with CONST values, rather than numbers themselves, such as CASE Key_A + Uppercase to represent the uppercase “A”.)
CASE i = 1 is just another simple math formula. If i is 1, it evaluates to a CASE -1; otherwise it evaluates to a CASE 0.
Take the following example and study it:
SELECT CASE x
CASE i = 1
With the above, if X = 0 and i <> 1, we’d execute whatever is in that CASE block, while at the same time, if x = -1 and i = 1, we’d execute whatever is in that CASE block. Otherwise we skip it.
It’s not really a syntax error for the IDE to catch, any more than CASE 1 + 2 would be an error for the IDE to catch when the user meant CASE 1, 2.
It’s valid syntax; it’s just not the syntax you really wanted in this case. ;)