diff options
author | LemonBoy <LemonBoy@users.noreply.github.com> | 2019-01-23 07:30:49 +0100 |
---|---|---|
committer | Miran <narimiran@disroot.org> | 2019-01-23 07:30:49 +0100 |
commit | eee9729f536fecd94565e879f28edcb73bcf3861 (patch) | |
tree | dcef2e0831c272ac544fb8ec802df366c54716f3 /tests/exception | |
parent | 94f6a6b29447caa1814016c61f9dd30b82d83eab (diff) | |
download | Nim-eee9729f536fecd94565e879f28edcb73bcf3861.tar.gz |
Fix semantic analysis with noReturn proc in tail pos (#10422)
Fixes #10417
Diffstat (limited to 'tests/exception')
-rw-r--r-- | tests/exception/texceptions.nim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/exception/texceptions.nim b/tests/exception/texceptions.nim index b30b3874b..d63187b0e 100644 --- a/tests/exception/texceptions.nim +++ b/tests/exception/texceptions.nim @@ -64,3 +64,13 @@ proc return_in_except = try: return_in_except() except: echo "RECOVER" +block: #10417 + proc moo() {.noreturn.} = discard + + let bar = + try: + 1 + except: + moo() + + doAssert(bar == 1) |