Not trying to nitpick here, but '2' is not an int here. It's the constant evaluated at compile time. But yeah, valid case if users of your code are in the habit of typing magic numbers into your function that expects enum.
My understanding is that on a practical level, these kinds of issues arise from misusing types (or not caring about them) and naively putting variables of one type into the function that expects another. Examples with number constants typed in manually do not hold ground.
>Well, this is simply not true.
As comment above [1] pointed out `printOperation(2)` is still valid.
[1] https://news.ycombinator.com/item?id=39565640