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

Handle closures with environment for autoclosures #1194

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lucteo
Copy link
Contributor

@lucteo lucteo commented Dec 6, 2023

No description provided.

// &counter += 1
// return r
// })
// logic2(withDelayed: r.abs())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kyouko-taiga : I would need your help understanding why the code generator inserts a call here to a function that it doesn't exist.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit hard to tell on the source code only, as I didn't write the logic for lowering autoclosures myself. Can you tell what the emitter believes this function should be?

If you print the IR you should at least see a semi-helpful description of the FunctionReference being applied.

@dabrahams
Copy link
Collaborator

@lucteo please either move this PR forward or close it; thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants