diff options
| author | Brian Campbell | 2020-04-27 17:20:46 +0100 |
|---|---|---|
| committer | Brian Campbell | 2020-04-27 17:20:46 +0100 |
| commit | ba2e8265c99bc31c9d1eb8829c4b63d7e2ccf3f4 (patch) | |
| tree | d6604cf75e7deae59c81732e62ebb3a328e15b1a /test/c | |
| parent | 54b6277d79c64d15b155fc161d927aa968afafa1 (diff) | |
Fix try in exception handler jib bug
The have_exception flag wasn't being cleared until after the handler,
resulting in false exception reporting.
Diffstat (limited to 'test/c')
| -rw-r--r-- | test/c/exception.expect | 2 | ||||
| -rw-r--r-- | test/c/exception.sail | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/test/c/exception.expect b/test/c/exception.expect index 79d97c6a..faab808f 100644 --- a/test/c/exception.expect +++ b/test/c/exception.expect @@ -4,3 +4,5 @@ Caught Estring test 2nd try Caught Epair x = 33 +in g() +Fall through OK diff --git a/test/c/exception.sail b/test/c/exception.sail index 4e74fcae..251852c9 100644 --- a/test/c/exception.sail +++ b/test/c/exception.sail @@ -47,6 +47,19 @@ function main () = { }, _ => () }; + try throw(Eunknown()) catch { + _ => try let _ = g() in () catch { + _ => print("caught old exception") + } + }; + try + try throw Eunknown() catch { + Estring(_) => () + } + catch { + Eunknown() => print("Fall through OK"), + _ => () + }; f(); () -}
\ No newline at end of file +} |
