summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2023-08-16 10:35:38 (GMT)
committerGitHub <noreply@github.com>2023-08-16 10:35:38 (GMT)
commitbdd8ddfda166d1ed49744d61dcc486d62a9ac890 (patch)
tree6a168ac0ae042454e8dce5bf457dc45bcb47d0a2 /Python
parentfd9d70a94de5b0756b52b9ae21e236e25545db4f (diff)
downloadcpython-bdd8ddfda166d1ed49744d61dcc486d62a9ac890.zip
cpython-bdd8ddfda166d1ed49744d61dcc486d62a9ac890.tar.gz
cpython-bdd8ddfda166d1ed49744d61dcc486d62a9ac890.tar.bz2
gh-105724: Add location information to `assert` errors (GH-105935)
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 83cf455..3260dba 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -3952,7 +3952,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;