forked from dafny-lang/dafny
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into per-backend-code-support-in-stdlibs
- Loading branch information
Showing
5 changed files
with
45 additions
and
3 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
2 changes: 1 addition & 1 deletion
2
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3304.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,6 +1,6 @@ | ||
git-issue-3304.dfy(5,9): Error: the type of this expression is underspecified | ||
| | ||
5 | assert [] == [[]]; | ||
| ^ | ||
|
||
git-issue-3304.dfy(5,9): Error: the type of this expression is underspecified | ||
1 resolution/type errors detected in git-issue-3304.dfy |
19 changes: 19 additions & 0 deletions
19
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4787.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,19 @@ | ||
// RUN: %exits-with 4 %baredafny verify %args --warn-redundant-assumptions --warn-contradictory-assumptions --show-snippets:true "%s" > "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
module M { | ||
opaque function ToSet(xs: seq<int>): set<int> { | ||
set x: int | x in xs | ||
} | ||
|
||
lemma LemmaCardinality(xs: seq<int>) | ||
ensures |ToSet(xs)| <= |xs| | ||
{} | ||
|
||
lemma LemmaEmpty(xs: seq<int>) | ||
requires xs == [] | ||
ensures |ToSet(xs)| == 0 | ||
{ | ||
assume false; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4787.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,22 @@ | ||
git-issue-4787.dfy(11,2): Error: a postcondition could not be proved on this return path | ||
| | ||
11 | {} | ||
| ^ | ||
|
||
git-issue-4787.dfy(10,12): Related location: this is the postcondition that could not be proved | ||
| | ||
10 | ensures |ToSet(xs)| <= |xs| | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
|
||
git-issue-4787.dfy(15,12): Warning: ensures clause proved using contradictory assumptions | ||
| | ||
15 | ensures |ToSet(xs)| == 0 | ||
| ^^^^^^^^^^^^^^^^ | ||
|
||
git-issue-4787.dfy(14,13): Warning: unnecessary requires clause | ||
| | ||
14 | requires xs == [] | ||
| ^^^^^^^^ | ||
|
||
|
||
Dafny program verifier finished with 1 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 @@ | ||
Fix error messages being printed after their context snippets |