summaryrefslogtreecommitdiff
path: root/tests/misc.toc
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-03-27 21:24:32 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2020-03-27 21:24:32 -0400
commit0848ff3bb41572d2e850360f220369ccd62c715b (patch)
treef94fc3f9a549fce6ce226729d47baf0e5285dd01 /tests/misc.toc
parent7cf5a8735ecbd37faf5e9f740d5f1a49939eea07 (diff)
removed StructDef.constants
Diffstat (limited to 'tests/misc.toc')
-rw-r--r--tests/misc.toc11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/misc.toc b/tests/misc.toc
index a9f6dc1..26ecf3e 100644
--- a/tests/misc.toc
+++ b/tests/misc.toc
@@ -25,5 +25,16 @@ main ::= fn() {
a[1] = y;
a[2] = z;
};
+
+ s ::= struct {
+ foo, e: int;
+ bar ::= 3;
+ baz: float;
+ }
+
+ p: s;
+ p.e = 100;
+ io.puti(p["bar"]);
+ io.puti(p["e"]);
};