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.
Fix: Crash using subset type dafny-lang#4724 (dafny-lang#4825)
### Description Fix for issue dafny-lang#4724 <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
Showing
4 changed files
with
13 additions
and
2 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
9 changes: 9 additions & 0 deletions
9
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4724.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,9 @@ | ||
// RUN: %exits-with 4 %dafny /compile:0 "%s" > "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
type seq31<T> = x: seq<T> | |x| <= 31 | ||
|
||
method TakeThis(x: seq31<int> := []) | ||
{ | ||
TakeThis(); // Error: cannot prove termination; try supplying a decreases clause | ||
} |
3 changes: 3 additions & 0 deletions
3
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4724.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,3 @@ | ||
git-issue-4724.dfy(8,10): Error: cannot prove termination; try supplying a decreases clause | ||
|
||
Dafny program verifier finished with 2 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: correction of type inference for default expressions |