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

fix: Exclude ghost variables from free-var substitution #2873

Closed
wants to merge 2 commits into from

Conversation

RustanLeino
Copy link
Collaborator

This PR excludes ghost variables from the closures that are generated by compiler (for all targets).

Fixes #2872

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@RustanLeino RustanLeino marked this pull request as ready for review October 10, 2022 16:41
@@ -2,6 +2,7 @@

- fix: Compiled lambdas now close only on non-ghost variables (https://github.com/dafny-lang/dafny/pull/2854)
- fix: Crash in the LSP in some code that does not parse (https://github.com/dafny-lang/dafny/pull/2833)
- fix: Exclude ghost variables from compilation of lambda-expression closures (https://github.com/dafny-lang/dafny/pull/2873)
Copy link
Member

@MikaelMayer MikaelMayer Oct 10, 2022

Choose a reason for hiding this comment

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

I think your fix is the same as the fix of the PR I merged 5 days ago 😁
#2854

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, by golly, you're right.

@MikaelMayer
Copy link
Member

Looks like we had a race condition, my PR was merged 5 days ago. See if it fixes exactly your problem:
#2854

@RustanLeino
Copy link
Collaborator Author

Fixed by #2854.

@RustanLeino RustanLeino deleted the issue-2872 branch October 27, 2022 00:59
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.

Lambda-expression closure includes ghost variables
3 participants