gh-105724: Add location information to assert errors (GH-105935)

This commit is contained in:
Nikita Sobolev 2023-08-16 13:35:38 +03:00 committed by GitHub
parent fd9d70a94d
commit bdd8ddfda1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 124 additions and 6 deletions

View file

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