mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.11] gh-116034: fix location info on the error of a failed assertion (#116052)
This commit is contained in:
parent
f225740211
commit
99ab0d49e2
3 changed files with 19 additions and 0 deletions
|
@ -4050,6 +4050,7 @@ compiler_assert(struct compiler *c, stmt_ty s)
|
|||
ADDOP_I(c, PRECALL, 0);
|
||||
ADDOP_I(c, CALL, 0);
|
||||
}
|
||||
SET_LOC(c, s->v.Assert.test);
|
||||
ADDOP_I(c, RAISE_VARARGS, 1);
|
||||
compiler_use_next_block(c, end);
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue