[3.12] gh-109195: fix source location for super load before LOAD_SUPER_ATTR (GH-109289) (#109291)

gh-109195: fix source location for super load before LOAD_SUPER_ATTR (GH-109289)
(cherry picked from commit ceeb4173ae)

Co-authored-by: Carl Meyer <carl@oddbird.net>
This commit is contained in:
Miss Islington (bot) 2023-09-12 07:20:41 -07:00 committed by GitHub
parent 8e96b98282
commit 2004e12d8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View file

@ -4776,7 +4776,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));