summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2024-02-28 19:12:16 (GMT)
committerGitHub <noreply@github.com>2024-02-28 19:12:16 (GMT)
commit99ab0d49e205cc3977205cc3b98d0b0224c1e642 (patch)
treecd8ee4ccb312205b2e566bc3686676e1c77b663e /Python
parentf2257402113b63c7d22af929d68918cae249402b (diff)
downloadcpython-99ab0d49e205cc3977205cc3b98d0b0224c1e642.zip
cpython-99ab0d49e205cc3977205cc3b98d0b0224c1e642.tar.gz
cpython-99ab0d49e205cc3977205cc3b98d0b0224c1e642.tar.bz2
[3.11] gh-116034: fix location info on the error of a failed assertion (#116052)
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 558df3f..16bc0ed 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -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;