diff options
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r-- | compiler/semexprs.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 2ffb9cd3a..e07821d1f 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -40,7 +40,7 @@ proc semExprWithType(c: PContext, n: PNode, flags: TExprFlags = {}): PNode = # do not produce another redundant error message: #raiseRecoverableError("") result = errorNode(c, n) - if result.typ == nil: + if result.typ == nil or result.typ == EnforceVoidContext: # we cannot check for 'void' in macros ... LocalError(n.info, errExprXHasNoType, renderTree(result, {renderNoComments})) |