summaryrefslogtreecommitdiff
path: root/test/c/fallthrough_exception.sail
diff options
context:
space:
mode:
Diffstat (limited to 'test/c/fallthrough_exception.sail')
-rw-r--r--test/c/fallthrough_exception.sail20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/c/fallthrough_exception.sail b/test/c/fallthrough_exception.sail
new file mode 100644
index 00000000..6260a603
--- /dev/null
+++ b/test/c/fallthrough_exception.sail
@@ -0,0 +1,20 @@
+default Order dec
+
+$include <prelude.sail>
+
+val print = "print_endline" : string -> unit
+
+union exception = {
+ E1 : unit,
+ E2 : unit
+}
+
+function main((): unit) -> unit = {
+ try {
+ try throw(E2()) catch {
+ E1() => print("E1")
+ }
+ } catch {
+ E2() => print("E2")
+ }
+} \ No newline at end of file