summaryrefslogtreecommitdiff
path: root/Test/dafny0/AutoReq.dfy
diff options
context:
space:
mode:
authorGravatar Bryan Parno <parno@microsoft.com>2014-01-10 13:02:21 -0800
committerGravatar Bryan Parno <parno@microsoft.com>2014-01-10 13:02:21 -0800
commit335ac08951e427500de34d55b14713cced6c12bd (patch)
treed7ae7d9d1c7903181b1ecb9a6131d81926a5dea0 /Test/dafny0/AutoReq.dfy
parentdd8d1baa05c4ca1bcbe594ec96a65c41f991604b (diff)
A better fix to deal with StaticReceiverTypes affected by autoReq.
Diffstat (limited to 'Test/dafny0/AutoReq.dfy')
-rw-r--r--Test/dafny0/AutoReq.dfy13
1 files changed, 12 insertions, 1 deletions
diff --git a/Test/dafny0/AutoReq.dfy b/Test/dafny0/AutoReq.dfy
index 684de262..0936176f 100644
--- a/Test/dafny0/AutoReq.dfy
+++ b/Test/dafny0/AutoReq.dfy
@@ -285,4 +285,15 @@ module StaticTest {
{
g(y)
}
-} \ No newline at end of file
+
+ static predicate IsEven(x:int)
+
+ static function EvenDoubler(x:int) : int
+ requires IsEven(x);
+
+ // Should succeed thanks to auto-generated requirement of IsEven
+ static function {:autoReq} test(y:int) : int
+ {
+ EvenDoubler(y)
+ }
+}