diff options
Diffstat (limited to 'test/c')
| -rw-r--r-- | test/c/option_nest.expect | 1 | ||||
| -rw-r--r-- | test/c/option_nest.sail | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/test/c/option_nest.expect b/test/c/option_nest.expect new file mode 100644 index 00000000..9daeafb9 --- /dev/null +++ b/test/c/option_nest.expect @@ -0,0 +1 @@ +test diff --git a/test/c/option_nest.sail b/test/c/option_nest.sail new file mode 100644 index 00000000..995bf074 --- /dev/null +++ b/test/c/option_nest.sail @@ -0,0 +1,18 @@ + +union test ('a : Type) = { + Just : 'a, + Nothing : unit +} + +union option ('a : Type) = { + None : unit, + Some : 'a +} + +val "print_endline" : string -> unit + +function main() : unit -> unit = { + let _ : test(option(int)) = Just(None()); + let Just(Some(x)) = Just(Some("test")); + print_endline(x) +}
\ No newline at end of file |
