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: Added a missing case in the Translator (pattern matching for variable declarations) #2966

Merged
merged 4 commits into from
Nov 2, 2022

Conversation

MikaelMayer
Copy link
Member

@MikaelMayer MikaelMayer commented Nov 1, 2022

This PR fixes #2920
I added the corresponding test.

Basically, a case was missing in the translator, so I added it, and did my best to generalize the case of the VarDeclStmt but applied to VarDeclPattern. I reused an existing function to substitute to patterns so that I'm almost sure I'm doing the right thing.

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

@MikaelMayer MikaelMayer enabled auto-merge (squash) November 1, 2022 18:40
Copy link
Contributor

@alex-chew alex-chew left a comment

Choose a reason for hiding this comment

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

Added a minor suggestion, otherwise LGTM.

Source/DafnyCore/Substituter.cs Outdated Show resolved Hide resolved
@MikaelMayer MikaelMayer merged commit 5bf0abf into master Nov 2, 2022
@MikaelMayer MikaelMayer deleted the fix-2920-unreachable-exception branch November 2, 2022 15:11
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.

cce+UnreachableException in Microsoft.Dafny.Substituter.SubstStmt
2 participants