mirror of
https://github.com/python/cpython.git
synced 2025-07-15 07:15:18 +00:00
[3.13] gh-123048: Fix missing source location in pattern matching code (GH-123167) (#123169)
gh-123048: Fix missing source location in pattern matching code (GH-123167)
(cherry picked from commit bffed80230
)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
This commit is contained in:
parent
595fb38e91
commit
159db050f4
3 changed files with 22 additions and 1 deletions
|
@ -7478,7 +7478,7 @@ compiler_match_inner(struct compiler *c, stmt_ty s, pattern_context *pc)
|
|||
ADDOP(c, LOC(m->pattern), POP_TOP);
|
||||
}
|
||||
VISIT_SEQ(c, stmt, m->body);
|
||||
ADDOP_JUMP(c, NO_LOCATION, JUMP_NO_INTERRUPT, end);
|
||||
ADDOP_JUMP(c, NO_LOCATION, JUMP, end);
|
||||
// If the pattern fails to match, we want the line number of the
|
||||
// cleanup to be associated with the failed pattern, not the last line
|
||||
// of the body
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue