Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Ability to cast a datatype to its trait when overriding functions (
#4824) This PR fixes #4823 There were two issues there: - The function override check was casting to ClassLikeDecl, when it should now be TopLevelDeclWithMembers as IndDatatypeDecl can also override trait declarations. - The generated axiom used to rely on types being unboxed, but since now we might compare a trait with a datatype value, we need to ensure correct boxing for Boogie to type-check. I added the corresponding test. <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
- Loading branch information