summaryrefslogtreecommitdiff
path: root/test/c/fallthrough_exception.sail
diff options
context:
space:
mode:
authorJon French2019-02-13 12:27:48 +0000
committerJon French2019-02-13 12:27:48 +0000
commitea39b3c674570ce5eea34067c36d5196ca201f83 (patch)
tree516e7491bc32797a4d0ac397ea47387f2b16cf1b /test/c/fallthrough_exception.sail
parentab3f3671d4dd682b2aee922d5a05e9455afd5849 (diff)
parent24fc989891ad266eae642815646294279e2485ca (diff)
Merge branch 'sail2' into rmem_interpreter
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