Please clarify: is a previously unknown bug a reason to close a question as off-topic?
Yesterday I was interested to answer this question, where an already written answer pointed out the presence of a bug, but didn't explain its cause nor added any review comments.
The bug happened in a unique edge case (only one special combination of values for the two arguments of the function), so it's clear that the OP's hadn't noticed this bug yet when posting his question.
So I wrote my own answer, including both explanation and correction of the bug, plus some review comments.
But today I see that the question has actually been closed as off-topic. I'm pretty surprised because, as far as I can understand the rule, this shouldn't happen when the OP honestly ignored the bug at the time he posted.
Looking for precisions about that, I found only discussions which all seem to assert the same, as illustrated by this answer in meta:
The "spirit" of the "working code" rule isn't to forbid code with bugs - in fact part of the peer review exercise is to highlight unforeseen edge cases and other issues - it's very possible that a programmer might have written code that works for the input they're feeding it, but that breaks in other situations; if OP isn't aware of this, they won't be asking for solutions to such specific issues.
The rule states that the code must work correctly, to the best of the author's knowledge. Usually, if the author does not mention any known bugs, then it's an allowable question.
So not only I don't understand the question is closed while it seems it shouldn't, but furtherly I'm disappointed to feel I actually wasted my time because I wasn't aware the OP could be closed.