summaryrefslogtreecommitdiff
path: root/Test/dafny0/NatTypes.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/NatTypes.dfy
parente52270deab6d2fd5b885848211c2d9d1ab814b09 (diff)
Dafny: retired the "call" keyword
Diffstat (limited to 'Test/dafny0/NatTypes.dfy')
-rw-r--r--Test/dafny0/NatTypes.dfy8
1 files changed, 4 insertions, 4 deletions
diff --git a/Test/dafny0/NatTypes.dfy b/Test/dafny0/NatTypes.dfy
index 161ac22f..e4d0cbe7 100644
--- a/Test/dafny0/NatTypes.dfy
+++ b/Test/dafny0/NatTypes.dfy
@@ -3,8 +3,8 @@ method M(n: nat) {
}
method Main() {
- call M(25);
- call M(-25); // error: cannot pass -25 as a nat
+ M(25);
+ M(-25); // error: cannot pass -25 as a nat
}
var f: nat;
@@ -34,7 +34,7 @@ method CheckField(x: nat, y: int)
method Generic<T>(i: int, t0: T, t1: T) returns (r: T) {
if (0 < i) {
var n: nat := 5;
- call j := Generic(i-1, n, -4);
+ var j := Generic(i-1, n, -4);
assert 0 <= j; // error: the result is an int, not a nat
var q := FenEric(n, -4);
assert 0 <= q; // error: the result is an int, not a nat
@@ -65,7 +65,7 @@ method MatchIt(list: List<object>) returns (k: nat)
match (list) {
case Nil =>
case Cons(n, extra, tail) =>
- call w := MatchIt(tail);
+ var w := MatchIt(tail);
assert 0 <= w;
assert 0 <= n; // fine
assert 0 <= n - 10; // error: possible assertion failure