summaryrefslogtreecommitdiff
path: root/Test/dafny4
diff options
context:
space:
mode:
authorGravatar qunyanm <unknown>2015-03-11 13:53:01 -0700
committerGravatar qunyanm <unknown>2015-03-11 13:53:01 -0700
commitce2050ff3372ef73976b824f59d8ec1a2ef1645c (patch)
treed2e1cd0e8ca99a66cba43ec2741b65a73a57db97 /Test/dafny4
parent13b3fc763b1d5ab070eb4583bbca342ec0582ac4 (diff)
Fix issue #54 and #57. Resolve a formal's type before creating a substitute.
Diffstat (limited to 'Test/dafny4')
-rw-r--r--Test/dafny4/Bug54.dfy26
-rw-r--r--Test/dafny4/Bug54.dfy.expect2
2 files changed, 28 insertions, 0 deletions
diff --git a/Test/dafny4/Bug54.dfy b/Test/dafny4/Bug54.dfy
new file mode 100644
index 00000000..c975ec9a
--- /dev/null
+++ b/Test/dafny4/Bug54.dfy
@@ -0,0 +1,26 @@
+// RUN: %dafny /compile:0 "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+predicate G<X>(f:X->bool)
+ reads f.reads;
+ requires forall x :: f.requires(x) && f(x);
+{
+ true
+}
+
+predicate H()
+{
+ G((x:int) => true)
+}
+
+predicate P1<X>(m:map<X,bool>)
+ requires forall x :: x in m ==> m[x];
+{
+ true
+}
+
+predicate P2(m:map<int,bool>)
+ requires forall x :: x in m ==> m[x];
+{
+ P1(map x:int | x in m :: true)
+} \ No newline at end of file
diff --git a/Test/dafny4/Bug54.dfy.expect b/Test/dafny4/Bug54.dfy.expect
new file mode 100644
index 00000000..73ba063c
--- /dev/null
+++ b/Test/dafny4/Bug54.dfy.expect
@@ -0,0 +1,2 @@
+
+Dafny program verifier finished with 4 verified, 0 errors