Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-aws committed Oct 11, 2024
1 parent c3dc53f commit a4da0f3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
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.

0 comments on commit a4da0f3

Please sign in to comment.