added 'sig' feature; removed tfShared support in the compiler

This commit is contained in:
Andreas Rumpf 2016-02-28 19:56:41 +01:00
commit 38dee2095c
17 changed files with 62 additions and 57 deletions

View file

@ -2354,6 +2354,7 @@ proc semExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
if not n.sons[0].typ.isEmptyType and not implicitlyDiscardable(n.sons[0]):
localError(n.info, errGenerated, "'defer' takes a 'void' expression")
#localError(n.info, errGenerated, "'defer' not allowed in this context")
of nkSigSection: result = semSigSection(c, n)
else:
localError(n.info, errInvalidExpressionX,
renderTree(n, {renderNoComments}))