diff options
author | qunyanm <unknown> | 2015-11-18 11:05:48 -0800 |
---|---|---|
committer | qunyanm <unknown> | 2015-11-18 11:05:48 -0800 |
commit | 9b2dea60e57be8ddb39b36ed8a282e3826cd4092 (patch) | |
tree | da041a2765c74d4a5dba3738b6e0a49de2f2ef19 /Test/dafny4 | |
parent | 5630200c12094d86d3ff75ce251f0776b8dfb265 (diff) |
Fix issue 108. Use idGenerator to create a new collection name for each
occurrence of Set/MapComprehension when translating it to c#.
Diffstat (limited to 'Test/dafny4')
-rw-r--r-- | Test/dafny4/Bug108.dfy | 11 | ||||
-rw-r--r-- | Test/dafny4/Bug108.dfy.expect | 7 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Test/dafny4/Bug108.dfy b/Test/dafny4/Bug108.dfy new file mode 100644 index 00000000..17cb9f12 --- /dev/null +++ b/Test/dafny4/Bug108.dfy @@ -0,0 +1,11 @@ +// RUN: %dafny /compile:3 "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+method Main() {
+ var A := map[0 := 1];
+ var B := map x | x in (set y | y in A) :: A[x];
+ print A, "\n";
+ print B, "\n";
+}
+
+
diff --git a/Test/dafny4/Bug108.dfy.expect b/Test/dafny4/Bug108.dfy.expect new file mode 100644 index 00000000..94e65ba2 --- /dev/null +++ b/Test/dafny4/Bug108.dfy.expect @@ -0,0 +1,7 @@ +
+Dafny program verifier finished with 2 verified, 0 errors
+Program compiled successfully
+Running...
+
+map[0 := 1] +map[0 := 1] |