summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-02-25 10:26:58 -0800
committerOri Bernstein <ori@eigenstate.org>2016-02-25 10:26:58 -0800
commit16bbf82067cacf44828b5f5023bdd6ec3b80b570 (patch)
tree2a2aafdf202cd6042eeec23de4dc7c979f49efb4 /test
parentda0fa1a6453838369e8d31f75d2a67777711adba (diff)
downloadmc-16bbf82067cacf44828b5f5023bdd6ec3b80b570.tar.gz
Tweak test to verify nested destructure.
Diffstat (limited to 'test')
-rw-r--r--test/tuple.myr14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/tuple.myr b/test/tuple.myr
index 1a12884..6ca2401 100644
--- a/test/tuple.myr
+++ b/test/tuple.myr
@@ -1,13 +1,11 @@
use std
/* checks that we can create tuples and destructure them. exits with 42. */
const main = {
- var v
- var x
- var a
- var b
+ var a, b, c
+ var v, x
- x = 15
- v = (x, x + 12)
- (a, b) = v
- std.exit(a + b)
+ x = 10
+ v = ((x, x + 12), x)
+ ((a, b), c) = v
+ std.exit(a + b + c)
}