From 15d455f388075db4dcccb5c348e9cd725124b318 Mon Sep 17 00:00:00 2001 From: Brian Campbell Date: Mon, 3 Jun 2019 18:31:53 +0100 Subject: Test case for previous commit --- test/coq/pass/non_exh_exc.sail | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/coq/pass/non_exh_exc.sail diff --git a/test/coq/pass/non_exh_exc.sail b/test/coq/pass/non_exh_exc.sail new file mode 100644 index 00000000..8ce99163 --- /dev/null +++ b/test/coq/pass/non_exh_exc.sail @@ -0,0 +1,18 @@ +default Order dec +$include + +union exception = { + Error_foo : unit, + Error_bar : int +} + +val f : int -> int effect {escape} + +function f(n) = { + try { + let m : int = if n > 5 then n - 3 else throw(Error_bar(n)) in + m + 1 + } catch { + Error_bar(n) => n + } +} -- cgit v1.2.3