-
Notifications
You must be signed in to change notification settings - Fork 253
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: No new resolver crash with partially resolved datatype update expressions #5440
base: master
Are you sure you want to change the base?
Fix: No new resolver crash with partially resolved datatype update expressions #5440
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix itself looks good. For the if/switch refactoring, I only did a quick scan.
datatype S = S( | ||
n:nat | ||
) { | ||
function f():S { this } | ||
function g():S { this.(n := 0).f() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file contains the failing test in Issue #5365, right? If so, should the name of the file reflect this?
…nullreferenceexception # Conflicts: # Source/DafnyCore/Resolver/PreType/PreTypeResolve.Expressions.cs
Fixes #5331
Fixes #5365
The only part that fixes the issue is the last line end of the file PreTypeResolve.Expressions.cs, the rest is an automated conversion If/then/else to a switch statement that helped debugging and makes the code easier to maintain.
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.