summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2017-06-30 02:17:48 -0700
committerOri Bernstein <ori@eigenstate.org>2017-06-30 23:15:23 -0700
commit0c7eb9f0d093a78520e5cff889dc3fd9d7f6d4c7 (patch)
treeb4ac5ede1f9d47f20e384efb691f30899df0e3dd /test
parent09a34baac6757c7a4c33e3e3c50054acbb1b70bb (diff)
downloadmc-0c7eb9f0d093a78520e5cff889dc3fd9d7f6d4c7.tar.gz
Support union constants
Diffstat (limited to 'test')
-rw-r--r--test/constunion.myr7
-rw-r--r--test/tests1
2 files changed, 8 insertions, 0 deletions
diff --git a/test/constunion.myr b/test/constunion.myr
new file mode 100644
index 0000000..d8c6ac5
--- /dev/null
+++ b/test/constunion.myr
@@ -0,0 +1,7 @@
+use std
+
+const x = `std.Some "thing"
+
+const main = {
+ std.put("{}\n", x)
+}
diff --git a/test/tests b/test/tests
index b19f482..ba4e075 100644
--- a/test/tests
+++ b/test/tests
@@ -45,6 +45,7 @@ B structasn E 42
B structarray E 42
B structret E 42
B constslice P 2312345678
+B constunion P '`std.Some thing'
B exportmain E 42
B slalloc E 123
B neststruct E 3