summaryrefslogtreecommitdiff
path: root/test/typecheck
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-02-26 16:08:32 +0000
committerAlasdair Armstrong2018-02-26 16:11:30 +0000
commite91a8c8659d08178dfec45a06529ade208ded186 (patch)
tree9d7191b96eef2cec20cf907912f50da1ff4f877f /test/typecheck
parentee123e2876c4fa5ae000256caeb7eb810e8c05f8 (diff)
Fix missing case in pattern completeness check
Fixes #4
Diffstat (limited to 'test/typecheck')
-rw-r--r--test/typecheck/pass/pat_completeness.sail11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/typecheck/pass/pat_completeness.sail b/test/typecheck/pass/pat_completeness.sail
new file mode 100644
index 00000000..fd4a7757
--- /dev/null
+++ b/test/typecheck/pass/pat_completeness.sail
@@ -0,0 +1,11 @@
+union option ('a : Type) = {None, Some : 'a}
+
+union ast = {Foo : unit}
+
+let x : option(ast) = Some(Foo)
+
+let y : unit = match(x) {
+ Some(Foo) => (),
+ Some(a) => (),
+ None => ()
+} \ No newline at end of file