[3.13] gh-120722: Set position on RETURN_VALUE in lambda (GH-120724) (#120738)

(cherry picked from commit d8f27cb114)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Miss Islington (bot) 2024-06-19 15:22:21 +02:00 committed by GitHub
parent c598e61a22
commit 4ce1246a99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31 additions and 2 deletions

View file

@ -3043,7 +3043,7 @@ compiler_lambda(struct compiler *c, expr_ty e)
co = optimize_and_assemble(c, 0);
}
else {
location loc = LOCATION(e->lineno, e->lineno, 0, 0);
location loc = LOC(e->v.Lambda.body);
ADDOP_IN_SCOPE(c, loc, RETURN_VALUE);
co = optimize_and_assemble(c, 1);
}