[3.11] gh-116034: fix location info on the error of a failed assertion (#116052)

This commit is contained in:
Irit Katriel 2024-02-28 19:12:16 +00:00 committed by GitHub
parent f225740211
commit 99ab0d49e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 0 deletions

View file

@ -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;