diff options
author | qunyanm <unknown> | 2015-11-30 13:03:21 -0800 |
---|---|---|
committer | qunyanm <unknown> | 2015-11-30 13:03:21 -0800 |
commit | f011e32f5a4a62b241c0c1301ab8010878b1bc7b (patch) | |
tree | 26c343b475a0e47fdc632ee0b1aee53ef17d74cc /Test | |
parent | 8131e68401d9f97d1216be32f3d0e23db83da744 (diff) |
Fix issue 111. Create a new BoundVar for each CasePattern of MatchCaseExpr when
trying to substitute the nested CasePattern with the BoundVar.
Diffstat (limited to 'Test')
-rw-r--r-- | Test/dafny4/Bug111.dfy | 18 | ||||
-rw-r--r-- | Test/dafny4/Bug111.dfy.expect | 2 |
2 files changed, 20 insertions, 0 deletions
diff --git a/Test/dafny4/Bug111.dfy b/Test/dafny4/Bug111.dfy new file mode 100644 index 00000000..730d44d3 --- /dev/null +++ b/Test/dafny4/Bug111.dfy @@ -0,0 +1,18 @@ +// RUN: %dafny /compile:0 "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+datatype A = A(i:int)
+datatype B = B1(a1:A) | B2(a2:A)
+
+function f(b:B):int
+{
+ match b
+ {
+ case B1(A(i)) => i
+ case B2(A(j)) => j
+ }
+}
+
+
+
+
diff --git a/Test/dafny4/Bug111.dfy.expect b/Test/dafny4/Bug111.dfy.expect new file mode 100644 index 00000000..c0c48e2b --- /dev/null +++ b/Test/dafny4/Bug111.dfy.expect @@ -0,0 +1,2 @@ +
+Dafny program verifier finished with 1 verified, 0 errors
|