Haven't we all?
I've even put it into error messages. "*** BUG xxxxx: this cannot happen". True at the time of coding it; not necessarily true in the face of future modifications.
It's useful, too. One case in a big open-source project came back to a user forum with a user who happily had a good attitude to it all. As anticipated, an update had indeed happened that created a new code path. From memory, that was an error-handling function, that handled every plausible case in a case switch, so when someone introduced a new error code it was handled by reporting the BUG.