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: retain non-method-body block statements when cloning abstract signatures #2731

Merged
merged 6 commits into from
Sep 13, 2022

Conversation

alex-chew
Copy link
Contributor

@alex-chew alex-chew commented Sep 12, 2022

Fixes #1639 by changing AbstractSignatureCloner to specifically delete only method bodies, instead of all block statements. This avoid breaking AST invariants of other block statements (e.g. that hints of a calc statement are non-null).

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

@alex-chew alex-chew changed the title fix: avoid invalid CalcStmt when cloning abstract signatures fix: retain non-method-body block statements when cloning abstract signatures Sep 13, 2022
@robin-aws robin-aws self-requested a review September 13, 2022 20:11
robin-aws
robin-aws previously approved these changes Sep 13, 2022
Copy link
Member

@robin-aws robin-aws left a comment

Choose a reason for hiding this comment

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

LGTM!

@alex-chew alex-chew merged commit 4d5c6e8 into dafny-lang:master Sep 13, 2022
@alex-chew alex-chew deleted the fix/issue-1639 branch September 13, 2022 23:28
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.

System.NullReferenceException on abstract module import containing function using calc
2 participants