summary refs log tree commit diff stats
path: root/tests/exception
diff options
context:
space:
mode:
authorLemonBoy <LemonBoy@users.noreply.github.com>2019-01-23 07:30:49 +0100
committerMiran <narimiran@disroot.org>2019-01-23 07:30:49 +0100
commiteee9729f536fecd94565e879f28edcb73bcf3861 (patch)
treedcef2e0831c272ac544fb8ec802df366c54716f3 /tests/exception
parent94f6a6b29447caa1814016c61f9dd30b82d83eab (diff)
downloadNim-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.nim10
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)
434bdbe3e ^
3ffde39cf ^
1c6c87f47 ^
363b1c0a4 ^
8f6a275f4 ^

fbe7bf3c8 ^
243e66596 ^


e9fc86597 ^
96c571dd9 ^
a01fd5e93 ^

c525dfabc ^

31a41594c ^
c1c3c4c5d ^
633dcca71 ^
5b9465acf ^

299b04491 ^
c1c76a20e ^
931496770 ^

e8f7d605f ^
ee08c6eec ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48