summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2024-02-29 12:36:54 (GMT)
committerGitHub <noreply@github.com>2024-02-29 12:36:54 (GMT)
commit6359141867595f84f9e803e1053ae51db3203c49 (patch)
treec3ff9c3fc54c04928b6d25ea0038d54ec20a3302 /Python
parent31462d4de2abb4a94ea41c21df3ef7d2fe6b8a22 (diff)
downloadcpython-6359141867595f84f9e803e1053ae51db3203c49.zip
cpython-6359141867595f84f9e803e1053ae51db3203c49.tar.gz
cpython-6359141867595f84f9e803e1053ae51db3203c49.tar.bz2
[3.12] gh-116034: fix location info on the error of a failed assertion (#116054)
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index ddd7b5c..a871e9c 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -3883,7 +3883,7 @@ compiler_assert(struct compiler *c, stmt_ty s)
VISIT(c, expr, s->v.Assert.msg);
ADDOP_I(c, LOC(s), CALL, 0);
}
- ADDOP_I(c, LOC(s), RAISE_VARARGS, 1);
+ ADDOP_I(c, LOC(s->v.Assert.test), RAISE_VARARGS, 1);
USE_LABEL(c, end);
return SUCCESS;