-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Clarify error location of inlined
is
predicates (#5587)
### Description Changes error location of `x is T` predicates (especially, inlined `is` predicates) from the `x` to the `is`. Fixes #5586 <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
1 parent
2c4dd00
commit 52ef046
Showing
7 changed files
with
34 additions
and
13 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
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
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
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
15 changes: 15 additions & 0 deletions
15
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-5586.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,15 @@ | ||
// RUN: %exits-with 4 %verify --type-system-refresh "%s" > "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
|
||
trait Trait { } | ||
|
||
class Class extends Trait { } | ||
|
||
predicate P(t: Trait) { | ||
t is Class // this is the related location of the error below | ||
} | ||
|
||
method M(u: Trait) { | ||
assert P(u); // error | ||
} |
4 changes: 4 additions & 0 deletions
4
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-5586.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
git-issue-5586.dfy(14,9): Error: assertion might not hold | ||
git-issue-5586.dfy(10,4): Related location: this proposition could not be proved | ||
|
||
Dafny program verifier finished with 0 verified, 1 error |
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 @@ | ||
Clarify error location of inlined `is` predicates. |