summaryrefslogtreecommitdiff
path: root/Test/dafny0/RefinementModificationChecking.dfy
diff options
context:
space:
mode:
authorGravatar Jason Koenig <unknown>2012-08-01 16:10:31 -0700
committerGravatar Jason Koenig <unknown>2012-08-01 16:10:31 -0700
commit20e7ca8e5adf56c16c6714743dfb9770a93fb1a9 (patch)
tree52ce8cfedfc283e9aeb1dbc4339842f690a41b6b /Test/dafny0/RefinementModificationChecking.dfy
parentc4889f600d436af6b52143e54118ad4b0927e268 (diff)
Dafny: fixed bug in reverifying allowing old locals to be modified.
Diffstat (limited to 'Test/dafny0/RefinementModificationChecking.dfy')
-rw-r--r--Test/dafny0/RefinementModificationChecking.dfy7
1 files changed, 4 insertions, 3 deletions
diff --git a/Test/dafny0/RefinementModificationChecking.dfy b/Test/dafny0/RefinementModificationChecking.dfy
index 887c3595..dbf39106 100644
--- a/Test/dafny0/RefinementModificationChecking.dfy
+++ b/Test/dafny0/RefinementModificationChecking.dfy
@@ -2,6 +2,7 @@
ghost module R1 {
var f: int;
method m(y: set<int>) returns (r: int)
+ modifies this;
{
var t := y;
}
@@ -13,9 +14,9 @@ ghost module R2 refines R1 {
{
...;
var x := 3;
- t := {1}; // bad: previous local
- r := 3; // bad: out parameter
- f := 4; // bad: previous field
+ t := {1}; // error: previous local
+ r := 3; // error: out parameter
+ f := 4; // fine: all fields, will cause re-verification
x := 6; // fine: new local
g := 34;// fine: new field
}