Implement language feature #6885 (#6954)

This commit is contained in:
cooldome 2017-12-25 00:22:03 +03:00 • committed by Andreas Rumpf
commit 2b3ec0a7c6
8 changed files with 131 additions and 14 deletions

View file

@ -771,6 +771,8 @@ 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:
localError(sym.ast[paramsPos][0].info, errNoReturnWithReturnTypeNotAllowed)
of wDynlib:
processDynLib(c, it, sym)
of wCompilerproc: