# Bug report The compiler's algorithm for line propagation has some heuristics which are not quite correct (particularly the `guarantee_lineno_for_exits`, which tidies up loose ends by assigning a possible incorrect line number). Also, line numbers are propagated after optimisation, and this prevents optimisation in a few cases (like when it's not clear whether two jumps have the same line number or not). <!-- gh-linked-prs --> ### Linked PRs * gh-114267 * gh-114530 * gh-114535 <!-- /gh-linked-prs -->