summaryrefslogtreecommitdiff
path: root/test/structarray.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2012-08-07 22:43:03 -0400
committerOri Bernstein <ori@eigenstate.org>2012-08-07 22:43:03 -0400
commitad1ad7e623b6a47ebf1e220c21462abafbe10e18 (patch)
tree248c8e236824ba8f008a4fdb970359e899646912 /test/structarray.myr
parentd7340522fdf6f9d3799546519de63db0483d6a17 (diff)
downloadmc-ad1ad7e623b6a47ebf1e220c21462abafbe10e18.tar.gz
Test arrays within structs.
Currently, broken.
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]
+}