commit
da4b0d994d
1 changed files with 1 additions and 1 deletions
|
|
@ -2260,7 +2260,7 @@ proc semExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
|
||||||
result = semStaticStmt(c, n)
|
result = semStaticStmt(c, n)
|
||||||
of nkDefer:
|
of nkDefer:
|
||||||
n.sons[0] = semExpr(c, n.sons[0])
|
n.sons[0] = semExpr(c, n.sons[0])
|
||||||
if not n.sons[0].typ.isEmptyType:
|
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' takes a 'void' expression")
|
||||||
#localError(n.info, errGenerated, "'defer' not allowed in this context")
|
#localError(n.info, errGenerated, "'defer' not allowed in this context")
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue