-
Notifications
You must be signed in to change notification settings - Fork 256
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: Optional pre-type won't cause a crash anymore #5442
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5906960
Add test for issue #5369
MikaelMayer a44d8b1
Fix: Optional pre-type won't cause a crash anymore
MikaelMayer 79dfa4c
Merge branch 'master' into fix-5369-crash-new-resolver
MikaelMayer 87aa2c5
Merge branch 'master' into fix-5369-crash-new-resolver
MikaelMayer eb0327c
Merge branch 'master' into fix-5369-crash-new-resolver
MikaelMayer cfa8acb
Added comment
MikaelMayer 12310a8
Review comments
MikaelMayer 0faf793
Update fix and expect file
keyboardDrummer 4445b96
Merge branch 'master' into fix-5369-crash-new-resolver
MikaelMayer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix: Optional pre-type won't cause a crash anymore
- Loading branch information
commit a44d8b1bce756e8b298467c0e5d0d48af2bd14c9
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -583,6 +583,8 @@ public enum CommonConfirmationBag { | |
preType = preType.Normalize(); | ||
if (preType is PreTypeProxy) { | ||
return false; | ||
} else if (preType is UnusedPreType) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a comment to the class |
||
return true; | ||
} | ||
|
||
var pt = (DPreType)preType; | ||
|
2 changes: 1 addition & 1 deletion
2
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-5369.dfy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-5369.dfy.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
|
||
Dafny program verifier finished with TODO verified, TODO errors | ||
git-issue-5369.dfy(20,2): Error: expression is not allowed to invoke a method (m) | ||
git-issue-5369.dfy(20,40): Error: expression is not allowed to invoke a method (m) | ||
git-issue-5369.dfy(20,42): Error: arguments to <= must have a common supertype (got int and (unused -- call to method m)) | ||
git-issue-5369.dfy(20,4): Error: expecting element type to be assignable to nat (got (unused -- call to method m)) | ||
git-issue-5369.dfy(32,9): Error: unresolved identifier: ThereIsASmallest | ||
5 resolution/type errors detected in git-issue-5369.dfy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Optional pre-type won't cause a crash anymore |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can you add a comment to
ConfirmConstraint
, or update its signature (parameter names) to make it clear what it does? I don't understand the meaning of the parameters or return value by looking at just its signature and comment.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.
I can't, as I don't understand the code at a level high enough to do that. I don't have a mental model of what ConfirmConstraint does, nor about what code context it was called with. I'll leave it for @RustanLeino to comment on it.