summaryrefslogtreecommitdiff
path: root/test/tupleaccess.myr
diff options
context:
space:
mode:
Diffstat (limited to 'test/tupleaccess.myr')
-rw-r--r--test/tupleaccess.myr14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/tupleaccess.myr b/test/tupleaccess.myr
new file mode 100644
index 0000000..cbd0f05
--- /dev/null
+++ b/test/tupleaccess.myr
@@ -0,0 +1,14 @@
+use std
+
+const foo = {
+ -> (1, 2, (3, 4))
+}
+
+const main = {
+ match foo()
+ | x:
+ x.0 = 0
+ (x.2).1 = 5
+ std.put("a: {}, b: {}, c: {}\n", x.0, x.2.1, foo().1)
+ ;;
+}