summaryrefslogtreecommitdiff
path: root/Test/dafny4/Bug58.dfy
diff options
context:
space:
mode:
authorGravatar qunyanm <unknown>2015-03-26 09:15:57 -0700
committerGravatar qunyanm <unknown>2015-03-26 09:15:57 -0700
commit3b5da042259432b62b70300e48f12cbdffdcf796 (patch)
treeae4f2d9c55579a9b0c9a277f007602e5f5d765f5 /Test/dafny4/Bug58.dfy
parentcabfb9e130591e87f8f5162f3d7a7c1a74ffdcd1 (diff)
Fix issue #58. In TrSplitExpr(), add allocatedness for arguments to the inlined
call.
Diffstat (limited to 'Test/dafny4/Bug58.dfy')
-rw-r--r--Test/dafny4/Bug58.dfy17
1 files changed, 17 insertions, 0 deletions
diff --git a/Test/dafny4/Bug58.dfy b/Test/dafny4/Bug58.dfy
new file mode 100644
index 00000000..4ffc5a58
--- /dev/null
+++ b/Test/dafny4/Bug58.dfy
@@ -0,0 +1,17 @@
+// RUN: %dafny /compile:0 "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+function M1(f:map<int, bool>, i:int):bool
+
+function M2(f:map<int, bool>, i:int):bool
+{
+ M1(map j | j in f :: f[j], i)
+}
+
+lemma L(f:map<int, bool>, i:int)
+ requires i in f;
+ requires M2(f, i);
+ requires forall j:int, f:map<int, bool> :: M1(f, j) == (j in f && f[j]);
+{
+ assert f[i];
+} \ No newline at end of file