summaryrefslogtreecommitdiff
path: root/test/c
diff options
context:
space:
mode:
authorAlasdair Armstrong2019-11-11 17:00:24 +0000
committerAlasdair Armstrong2019-11-11 17:00:24 +0000
commitcd49c9df8e1d688327ae045729b538df00b77622 (patch)
treec44354bb5ee44c165e9ac6e69795d1ae96c58a3f /test/c
parent20df613aee16ab0a1610bd9507c55d4fe48a43f3 (diff)
Make sure undefined_gen inserts enough type annotations for union constructors
Diffstat (limited to 'test/c')
-rw-r--r--test/c/undefined_union.expect1
-rw-r--r--test/c/undefined_union.sail11
2 files changed, 12 insertions, 0 deletions
diff --git a/test/c/undefined_union.expect b/test/c/undefined_union.expect
new file mode 100644
index 00000000..9766475a
--- /dev/null
+++ b/test/c/undefined_union.expect
@@ -0,0 +1 @@
+ok
diff --git a/test/c/undefined_union.sail b/test/c/undefined_union.sail
new file mode 100644
index 00000000..9b652b34
--- /dev/null
+++ b/test/c/undefined_union.sail
@@ -0,0 +1,11 @@
+
+union Test = {
+ Ctor1 : int,
+ Ctor2 : (int, int)
+}
+
+val "print_endline" : string -> unit
+
+function main() -> unit = {
+ print_endline("ok")
+}