-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Golang: Skip ghost parameters in type parameter downcast (#5815)
### Description Fixes #5814 ### How has this been tested? github-issue-5814.dfy <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
8f8f585
commit c4dd8e5
Showing
3 changed files
with
19 additions
and
1 deletion.
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
18 changes: 18 additions & 0 deletions
18
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/github-issue-5814.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,18 @@ | ||
// RUN: %testDafnyForEachCompiler "%s" | ||
|
||
trait MyTrait<T> { | ||
method Bar(ghost x: T, y: T) returns (z: T) | ||
} | ||
|
||
class MyClass extends MyTrait<int> { | ||
constructor() {} | ||
method Bar(ghost x: int, y: int) returns (z: int) { | ||
return y; | ||
} | ||
} | ||
|
||
method Main() { | ||
var c := new MyClass(); | ||
var z := c.Bar(7, 42); | ||
expect z == 42; | ||
} |
Empty file.