I'm guessing no one is crazy enough to consider line numbers part of the public API. And yet... I could imagine myself writing code like this if I were desperate enough, even though I would know perfectly well that my code would probably break the never next time I upgrade.
Sure, but that's because you know you've used a non-public API in which case semver has nothing to do with the conversation.