summaryrefslogtreecommitdiff
path: root/Test/dafny0/TypeParameters.dfy
diff options
context:
space:
mode:
authorGravatar Rustan Leino <leino@microsoft.com>2011-05-26 00:02:57 -0700
committerGravatar Rustan Leino <leino@microsoft.com>2011-05-26 00:02:57 -0700
commitd9f2a82a417703f3669ba8399dcc8bcf34c3d742 (patch)
tree08b309fd809639a62c453c33dac86845dd4b9815 /Test/dafny0/TypeParameters.dfy
parente52270deab6d2fd5b885848211c2d9d1ab814b09 (diff)
Dafny: retired the "call" keyword
Diffstat (limited to 'Test/dafny0/TypeParameters.dfy')
-rw-r--r--Test/dafny0/TypeParameters.dfy14
1 files changed, 7 insertions, 7 deletions
diff --git a/Test/dafny0/TypeParameters.dfy b/Test/dafny0/TypeParameters.dfy
index a044341e..a3698dc0 100644
--- a/Test/dafny0/TypeParameters.dfy
+++ b/Test/dafny0/TypeParameters.dfy
@@ -13,7 +13,7 @@ class C<U> {
method Main(u: U)
{
var t := F(3,u) && F(this,u);
- call kz := M(t,u);
+ var kz := M(t,u);
assert kz && (G() || !G());
}
@@ -30,14 +30,14 @@ class SetTest {
method Good()
{
var s := {2, 5, 3};
- call t := Add(s, 7);
+ var t := Add(s, 7);
assert {5,7,2,3} == t;
}
method Bad()
{
var s := {2, 50, 3};
- call t := Add(s, 7);
+ var t := Add(s, 7);
assert {5,7,2,3} == t; // error
}
}
@@ -52,14 +52,14 @@ class SequenceTest {
method Good()
{
var s := [2, 5, 3];
- call t := Add(s, 7);
+ var t := Add(s, 7);
assert [2,5,3,7] == t;
}
method Bad()
{
var s := [2, 5, 3];
- call t := Add(s, 7);
+ var t := Add(s, 7);
assert [2,5,7,3] == t || [2,5,3] == t; // error
}
}
@@ -92,7 +92,7 @@ class CClient {
}
c.x := 5;
c.x := c.x;
- call z := c.M(c, 17);
+ var z := c.M(c, 17);
assert z == c.x;
}
}
@@ -170,7 +170,7 @@ method TyKn_Main(k0: TyKn_K) {
assert c.x != null ==> c.x.F() == 176; // the Dafny encoding needs the canCall mechanism to verify this
assert c.G() != null ==> c.G().F() == 176; // ditto
- call k2 := c.M();
+ var k2 := c.M();
assert k2 != null ==> k2.F() == 176; // the canCall mechanism does the trick here, but so does the encoding
// via k2's where clause
}