summaryrefslogtreecommitdiff
path: root/Test/dafny0/Datatypes.dfy
diff options
context:
space:
mode:
authorGravatar Rustan Leino <unknown>2013-06-20 19:48:47 -0700
committerGravatar Rustan Leino <unknown>2013-06-20 19:48:47 -0700
commite6d538df09a5b615b7be8d02c8d0f19ccb0483b2 (patch)
tree78120b1f3593b5ceea2f2d46beaececc72846c8a /Test/dafny0/Datatypes.dfy
parentf531c8c497cf6b8a8d4ea6eb9c414581f41c7735 (diff)
Fixed a problem where changes to a substMap were not being undone, curing Issue 15 on dafny.codeplex.com.
Also fixed some code that make an optimization possible.
Diffstat (limited to 'Test/dafny0/Datatypes.dfy')
-rw-r--r--Test/dafny0/Datatypes.dfy9
1 files changed, 9 insertions, 0 deletions
diff --git a/Test/dafny0/Datatypes.dfy b/Test/dafny0/Datatypes.dfy
index 5598844d..b00d5c21 100644
--- a/Test/dafny0/Datatypes.dfy
+++ b/Test/dafny0/Datatypes.dfy
@@ -272,3 +272,12 @@ function foo(f: Fwd): int
{
if f.FwdNil? then 0 else f.k
}
+
+// -- regression test --
+
+predicate F(xs: List, vs: map<int,int>)
+{
+ match xs
+ case Nil => true
+ case Cons(_, tail) => forall vsi :: F(tail, vsi)
+}