gh-109195: fix source location for super load before LOAD_SUPER_ATTR (#109289)

This commit is contained in:
Carl Meyer 2023-09-11 17:35:49 -06:00 committed by GitHub
parent fbaf77eb9b
commit ceeb4173ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View file

@ -4868,7 +4868,7 @@ load_args_for_super(struct compiler *c, expr_ty e) {
// load super() global
PyObject *super_name = e->v.Call.func->v.Name.id;
RETURN_IF_ERROR(compiler_nameop(c, loc, super_name, Load));
RETURN_IF_ERROR(compiler_nameop(c, LOC(e->v.Call.func), super_name, Load));
if (asdl_seq_LEN(e->v.Call.args) == 2) {
VISIT(c, expr, asdl_seq_GET(e->v.Call.args, 0));