diff options
author | Rustan Leino <unknown> | 2014-04-04 22:04:48 -0700 |
---|---|---|
committer | Rustan Leino <unknown> | 2014-04-04 22:04:48 -0700 |
commit | 104580b738eaeb22ab6b2120a5d08c211bfee9e0 (patch) | |
tree | 2aac15ff09b685f480193bb0772ecdd60ad453b8 /Source/Dafny/RefinementTransformer.cs | |
parent | 3345f55fab43efb9bf2e584e14f6d9c90cf3dec7 (diff) |
Fixed refinement of modify statements
Diffstat (limited to 'Source/Dafny/RefinementTransformer.cs')
-rw-r--r-- | Source/Dafny/RefinementTransformer.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Dafny/RefinementTransformer.cs b/Source/Dafny/RefinementTransformer.cs index 3ba4b01d..1500e37f 100644 --- a/Source/Dafny/RefinementTransformer.cs +++ b/Source/Dafny/RefinementTransformer.cs @@ -1043,7 +1043,7 @@ namespace Microsoft.Dafny if (oldModifyStmt.Body == null && skel.Body == null) {
mbody = null;
} else if (oldModifyStmt.Body == null) {
- mbody = oldModifyStmt.Body;
+ mbody = skel.Body;
} else if (skel.Body == null) {
reporter.Error(cur.Tok, "modify template must have a body if the inherited modify statement does");
mbody = null;
@@ -1266,6 +1266,8 @@ namespace Microsoft.Dafny return other is IfStmt;
} else if (S is WhileStmt) {
return other is WhileStmt;
+ } else if (S is ModifyStmt) {
+ return other is ModifyStmt;
} else {
Contract.Assume(false); // unexpected skeleton
}
|