gh-120722: Set position on RETURN_VALUE in lambda (#120724)

This commit is contained in:
Jelle Zijlstra 2024-06-19 05:56:36 -07:00 committed by GitHub
parent a86e6255c3
commit d8f27cb114
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31 additions and 2 deletions

View file

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