-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Check for correct use of type characteristics in ghosts and defa…
…ult expressions (#4928) This PR adds checks for correct instantiations of type parameters that were previously missing. Previously, these checks were only done in non-ghost expressions (historically, it seems the code that performs these checks was designed for checking `(==)`, which applies only in ghost expressions). This PR adds the checks also specifications (which are ghost) and default expressions for parameters). The new test file `git-issue-4926.dfy` reports 38 errors, whereas before this PR, Dafny reported only 8. It also extracts the code for these checks into a separate file, `TypeCharacteristicChecker.cs` (in addition to the existing file `CheckTypeCharacteristics_Visitor`). Fixes #4926 <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> --------- Co-authored-by: Stefan Zetzsche <[email protected]>
- Loading branch information
1 parent
b599ba6
commit 47ab929
Showing
20 changed files
with
521 additions
and
357 deletions.
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
Oops, something went wrong.