Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lowering: Don't mutate lambda in linearize #57416

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mlechu
Copy link
Contributor

@mlechu mlechu commented Feb 14, 2025

Fixes #56904.

The associated PR (#55876) compiles a finally block, then compiles a renumbered version of it. This works if compile doesn't mutate its input, but in reality, lambda bodies were being set! when linearized. The "invalid syntax" error was a result of attempting to linearize a lambda twice.

@nsajko nsajko added compiler:lowering Syntax lowering (compiler front end, 2nd stage) bugfix This change fixes an existing bug backport 1.12 Change should be backported to release-1.12 labels Feb 14, 2025
@Keno Keno requested a review from JeffBezanson February 14, 2025 22:52
This was referenced Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.12 Change should be backported to release-1.12 bugfix This change fixes an existing bug compiler:lowering Syntax lowering (compiler front end, 2nd stage)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lowering regression on nightly causing spurious syntax errors
2 participants