mirror of
https://github.com/python/cpython.git
synced 2025-08-23 10:16:01 +00:00
[3.12] gh-120722: Set position on RETURN_VALUE in lambda (GH-120724) (#120739)
(cherry picked from commit d8f27cb114
)
This commit is contained in:
parent
cde976d85c
commit
d62cbba235
3 changed files with 31 additions and 2 deletions
|
@ -2966,7 +2966,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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue