From 0848ff3bb41572d2e850360f220369ccd62c715b Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Fri, 27 Mar 2020 21:24:32 -0400 Subject: removed StructDef.constants --- tests/misc.toc | 11 +++++++++++ tests/misc_expected | 2 ++ 2 files changed, 13 insertions(+) (limited to 'tests') 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"]); }; diff --git a/tests/misc_expected b/tests/misc_expected index 92e0278..e35eecf 100644 --- a/tests/misc_expected +++ b/tests/misc_expected @@ -2,3 +2,5 @@ Hello! 116 6 0 +3 +100 -- cgit v1.2.3