summaryrefslogtreecommitdiff
path: root/test/c/fallthrough_exception.sail
diff options
context:
space:
mode:
authorAlasdair Armstrong2019-02-12 18:18:05 +0000
committerAlasdair Armstrong2019-02-12 18:18:05 +0000
commit24fc989891ad266eae642815646294279e2485ca (patch)
treed533fc26b5980d1144ee4d7849d3dd0f2a1b0e95 /test/c/fallthrough_exception.sail
parentb847a472a1f853d783d1af5f8eb033b97f33be5b (diff)
parent974494b1dda38c1ee5c1502cc6e448e67a7374ac (diff)
Merge remote-tracking branch 'origin/asl_flow2' into sail2
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