From c8665edc57e755d4151c2af092a1058def5bf0ca Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Tue, 28 May 2019 16:04:56 +0100 Subject: Make sure single clause functions with top-level guards work correctly --- test/c/single_guard.expect | 2 ++ test/c/single_guard.sail | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 test/c/single_guard.expect create mode 100644 test/c/single_guard.sail (limited to 'test/c') 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 + +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 -- cgit v1.2.3