diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/typecheck/pass/single_union.sail | 10 |
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) |
