diff options
author | leino <unknown> | 2015-09-28 13:16:15 -0700 |
---|---|---|
committer | leino <unknown> | 2015-09-28 13:16:15 -0700 |
commit | 0c1ec594e68dab4fcd458a00f9f7a1ac6de2e218 (patch) | |
tree | cb89d6ef66c96bfa171f954898548f295a3cabc0 /Test/dafny0/ParallelResolveErrors.dfy | |
parent | ebaaa36321463925dc9030455e87ae17732b2353 (diff) |
Changed computation of ghosts until pass 2 of resolution.
Other clean-up in resolution passes, like:
Include everything of type "char" into bounds that are discovered, and likewise for reference types.
Allow more set comprehensions, determining if they are finite based on their argument type.
Changed CalcExpr.SubExpressions to not include computed expressions.
Diffstat (limited to 'Test/dafny0/ParallelResolveErrors.dfy')
-rw-r--r-- | Test/dafny0/ParallelResolveErrors.dfy | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Test/dafny0/ParallelResolveErrors.dfy b/Test/dafny0/ParallelResolveErrors.dfy index 61956651..8c48487d 100644 --- a/Test/dafny0/ParallelResolveErrors.dfy +++ b/Test/dafny0/ParallelResolveErrors.dfy @@ -7,7 +7,6 @@ class C { ghost method Init_ModifyNothing() { }
ghost method Init_ModifyThis() modifies this;
{
- data := 6; // error: assignment to a non-ghost field
gdata := 7;
}
ghost method Init_ModifyStuff(c: C) modifies this, c; { }
@@ -120,3 +119,15 @@ method M3(c: C) c.GhostMethodWithModifies(x); // error: not allowed to call method with nonempty modifies clause
}
}
+
+module AnotherModule {
+ class C {
+ var data: int;
+ ghost var gdata: int;
+ ghost method Init_ModifyThis() modifies this;
+ {
+ data := 6; // error: assignment to a non-ghost field
+ gdata := 7;
+ }
+ }
+}
|