summaryrefslogtreecommitdiff
path: root/test/structarray.myr
diff options
context:
space:
mode:
Diffstat (limited to 'test/structarray.myr')
-rw-r--r--test/structarray.myr12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/structarray.myr b/test/structarray.myr
new file mode 100644
index 0000000..682d631
--- /dev/null
+++ b/test/structarray.myr
@@ -0,0 +1,12 @@
+type t = struct
+ a : int[42]
+;;
+
+const main = {
+ var v : t
+
+ v.a[0] = 12
+ v.a[1] = 20
+
+ -> 2*v.a[0] + v.a[1]
+}