diff options
| author | Brian Campbell | 2017-08-17 10:58:00 +0100 |
|---|---|---|
| committer | Brian Campbell | 2017-08-17 10:58:00 +0100 |
| commit | bc156a0c30ddc4e09586ec43e901ce94832bc8e3 (patch) | |
| tree | 5fbb467a0c0f4882b8c1b4add4c730a308af3bab /test | |
| parent | f88cb793118d28d061fdee4d5bd8317f541136b8 (diff) | |
| parent | 9f013687086937df8be81dd6a0ebd86fc750abf7 (diff) | |
Merge branch 'experiments' of bitbucket.org:Peter_Sewell/sail into mono-experiments
Diffstat (limited to 'test')
| -rw-r--r-- | test/typecheck/pass/trycatch.sail | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/typecheck/pass/trycatch.sail b/test/typecheck/pass/trycatch.sail new file mode 100644 index 00000000..b7f97dd0 --- /dev/null +++ b/test/typecheck/pass/trycatch.sail @@ -0,0 +1,20 @@ + +scattered typedef exception = const union + +union exception member int IntEx + +val unit -> unit effect {escape} test2 + +function test2 () = throw (IntEx(3)) + +val unit -> unit effect {escape} test + +function test () = + try { + test2(); + () + } catch { + case (IntEx(_)) -> () + } + +end exception |
