diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2023-08-16 10:35:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-16 10:35:38 (GMT) |
commit | bdd8ddfda166d1ed49744d61dcc486d62a9ac890 (patch) | |
tree | 6a168ac0ae042454e8dce5bf457dc45bcb47d0a2 /Python | |
parent | fd9d70a94de5b0756b52b9ae21e236e25545db4f (diff) | |
download | cpython-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.c | 2 |
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; |