summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/pragmas.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim
index 35fedf4ea..02b57d5a3 100644
--- a/compiler/pragmas.nim
+++ b/compiler/pragmas.nim
@@ -771,7 +771,7 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: int,
       of wNoreturn:
         noVal(it)
         incl(sym.flags, sfNoReturn)
-        if sym.ast[paramsPos][0].kind != nkEmpty:
+        if sym.typ[0] != nil:
           localError(sym.ast[paramsPos][0].info, errNoReturnWithReturnTypeNotAllowed)
       of wDynlib:
         processDynLib(c, it, sym)