fixes #2366
This commit is contained in:
parent
880e39d123
commit
16adfcdfa6
3 changed files with 8 additions and 2 deletions
|
|
@ -2224,6 +2224,8 @@ proc semExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
|
|||
result = semPragmaBlock(c, n)
|
||||
of nkStaticStmt:
|
||||
result = semStaticStmt(c, n)
|
||||
of nkDefer:
|
||||
localError(n.info, errGenerated, "'defer' not allowed in this context")
|
||||
else:
|
||||
localError(n.info, errInvalidExpressionX,
|
||||
renderTree(n, {renderNoComments}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue