diff options
author | qunyanm <unknown> | 2015-11-14 14:50:26 -0800 |
---|---|---|
committer | qunyanm <unknown> | 2015-11-14 14:50:26 -0800 |
commit | 854acf0f7f5aa105500c6d0ee0fcf0d4c918a81e (patch) | |
tree | 782088f9c132efca00ff8b042d4cf32f41bbf82d /Test/dafny4/Bug94.dfy | |
parent | cfd717411a1d82e4d0b1ad845cbe0984ecc1618f (diff) |
Fix issue 94. Allow tuple-based assignment in statement contexts.
Diffstat (limited to 'Test/dafny4/Bug94.dfy')
-rw-r--r-- | Test/dafny4/Bug94.dfy | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Test/dafny4/Bug94.dfy b/Test/dafny4/Bug94.dfy new file mode 100644 index 00000000..2f437785 --- /dev/null +++ b/Test/dafny4/Bug94.dfy @@ -0,0 +1,35 @@ +// RUN: %dafny /compile:3 "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+function foo() : (int, int)
+{
+ (5, 10)
+}
+
+function bar() : int
+{
+ var (x, y) := foo();
+ x + y
+}
+
+lemma test()
+{
+ var (x, y) := foo();
+}
+
+function method foo2() : (int,int)
+{
+ (5, 10)
+}
+
+method test2()
+{
+ var (x, y) := foo2();
+}
+
+method Main()
+{
+ var (x, y) := foo2();
+ assert (x+y == 15);
+ print(x+y);
+}
|