diff options
author | chmaria <unknown> | 2014-06-03 16:55:05 -0700 |
---|---|---|
committer | chmaria <unknown> | 2014-06-03 16:55:05 -0700 |
commit | 6d32fe37e3d343f9e310eeea193efc8da5982600 (patch) | |
tree | 3a6bcda5eb3ef99b9e2e8fd030f3352ab2296476 /Test/dafny0/ResolutionErrors.dfy | |
parent | 607ef28aadb281ab61a2be493a637126e967a388 (diff) |
Added support for 'dirty' forall statements.
One can now write forall statements without bodies
(but with ensures clauses) as follows:
forall s | s in S ensures s < 0;
where S is set<int>.
The ensures clauses are assumed but not checked.
Diffstat (limited to 'Test/dafny0/ResolutionErrors.dfy')
-rw-r--r-- | Test/dafny0/ResolutionErrors.dfy | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Test/dafny0/ResolutionErrors.dfy b/Test/dafny0/ResolutionErrors.dfy index e49f9823..f3297ed7 100644 --- a/Test/dafny0/ResolutionErrors.dfy +++ b/Test/dafny0/ResolutionErrors.dfy @@ -905,3 +905,10 @@ module LhsLvalue { method MyLemma() returns (w: int)
}
+
+// ------------------- dirty loops -------------------
+
+method DirtyM(S: set<int>) {
+ forall s | s in S ensures s < 0;
+ assert s < 0; // error: s is unresolved
+}
|