diff options
| author | Alasdair Armstrong | 2019-05-28 16:04:56 +0100 |
|---|---|---|
| committer | Alasdair Armstrong | 2019-05-28 16:08:18 +0100 |
| commit | c8665edc57e755d4151c2af092a1058def5bf0ca (patch) | |
| tree | 4251b39fbc67860aac81efdde6afe7f2ea2b4549 /test/c | |
| parent | ed6162d7b7179652e82a83918c7391e9c29c950e (diff) | |
Make sure single clause functions with top-level guards work correctly
Diffstat (limited to 'test/c')
| -rw-r--r-- | test/c/single_guard.expect | 2 | ||||
| -rw-r--r-- | test/c/single_guard.sail | 16 |
2 files changed, 18 insertions, 0 deletions
diff --git a/test/c/single_guard.expect b/test/c/single_guard.expect new file mode 100644 index 00000000..070cdc2c --- /dev/null +++ b/test/c/single_guard.expect @@ -0,0 +1,2 @@ +In main +In test diff --git a/test/c/single_guard.sail b/test/c/single_guard.sail new file mode 100644 index 00000000..017ed8a5 --- /dev/null +++ b/test/c/single_guard.sail @@ -0,0 +1,16 @@ +default Order dec + +$include <prelude.sail> + +val "print_endline" : string -> unit + +val test : unit -> unit + +function test(_ if true) = { + print_endline("In test") +} + +function main() -> unit = { + print_endline("In main"); + test() +}
\ No newline at end of file |
