summaryrefslogtreecommitdiff
path: root/test/typecheck
diff options
context:
space:
mode:
authorBrian Campbell2020-11-25 22:40:29 +0000
committerBrian Campbell2020-11-25 22:40:29 +0000
commit3c43a474e03ef94839ebef530f5a2bbd173add5b (patch)
treed5f5b6939102bea77254437c873b761c0ebce438 /test/typecheck
parent3d0064a157a711f21d23f56dc2c423b2e3b1d74a (diff)
Remove bogus pattern completeness warning on singleton enums and unions
Diffstat (limited to 'test/typecheck')
-rw-r--r--test/typecheck/pass/single_union.sail10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/typecheck/pass/single_union.sail b/test/typecheck/pass/single_union.sail
new file mode 100644
index 00000000..73eeee50
--- /dev/null
+++ b/test/typecheck/pass/single_union.sail
@@ -0,0 +1,10 @@
+union foo = { BAR : int }
+
+val f : foo -> int
+function f BAR(x) = x
+
+val g : foo -> int
+function g x = match x { BAR(y) => y }
+
+val h : int -> foo
+function h x = BAR(x)