-
Notifications
You must be signed in to change notification settings - Fork 268
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: Ability to cast a datatype to its trait when overriding functions #4824
Conversation
…com/dafny-lang/dafny into fix-4823-general-traits-bug-extends
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.
Looks good, except for the unused declared of Cutoff
.
@@ -569,6 +569,8 @@ public partial class BoogieGenerator { | |||
} | |||
} | |||
|
|||
private int Cutoff = 0; |
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.
It seems this field is not used.
…com/dafny-lang/dafny into fix-4823-general-traits-bug-extends
…com/dafny-lang/dafny into fix-4823-general-traits-bug-extends
…com/dafny-lang/dafny into fix-4823-general-traits-bug-extends
…com/dafny-lang/dafny into fix-4823-general-traits-bug-extends
…com/dafny-lang/dafny into fix-4823-general-traits-bug-extends
# Conflicts: # Source/DafnyCore/Verifier/BoogieGenerator.Functions.cs # Source/DafnyStandardLibraries/binaries/DafnyStandardLibraries-cs.doo # Source/DafnyStandardLibraries/binaries/DafnyStandardLibraries-go.doo # Source/DafnyStandardLibraries/binaries/DafnyStandardLibraries-java.doo # Source/DafnyStandardLibraries/binaries/DafnyStandardLibraries-js.doo # Source/DafnyStandardLibraries/binaries/DafnyStandardLibraries-notarget.doo # Source/DafnyStandardLibraries/binaries/DafnyStandardLibraries-py.doo # Source/DafnyStandardLibraries/binaries/DafnyStandardLibraries.doo
# Conflicts: # Source/DafnyStandardLibraries/binaries/DafnyStandardLibraries-cs.doo # Source/DafnyStandardLibraries/binaries/DafnyStandardLibraries-go.doo # Source/DafnyStandardLibraries/binaries/DafnyStandardLibraries-java.doo # Source/DafnyStandardLibraries/binaries/DafnyStandardLibraries-js.doo # Source/DafnyStandardLibraries/binaries/DafnyStandardLibraries-notarget.doo # Source/DafnyStandardLibraries/binaries/DafnyStandardLibraries-py.doo # Source/DafnyStandardLibraries/binaries/DafnyStandardLibraries.doo # Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Fuel.legacy.dfy.expect
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.
It seems issue 4823 was fixed between Dafny 4.4 and 4.5.
Indeed! The fix itself I had originally published got ousted in the merge commit, but at least this PR adds a test. |
This PR fixes #4823 (but not #4982 yet)
There were two issues there:
I added the corresponding test.
I also ensured that the generation of doo files only use \n lines when creating the source (fixes #4989)
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.