fixes #6127
This commit is contained in:
parent
3862651d44
commit
4e3bdcc84b
1 changed files with 3 additions and 5 deletions
|
|
@ -47,11 +47,9 @@ proc semExprWithType(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
|
||||||
#raiseRecoverableError("")
|
#raiseRecoverableError("")
|
||||||
result = errorNode(c, n)
|
result = errorNode(c, n)
|
||||||
if result.typ == nil or result.typ == enforceVoidContext:
|
if result.typ == nil or result.typ == enforceVoidContext:
|
||||||
if n.kind != nkStmtList:
|
localError(n.info, errExprXHasNoType,
|
||||||
# we cannot check for 'void' in macros ...
|
renderTree(result, {renderNoComments}))
|
||||||
localError(n.info, errExprXHasNoType,
|
result.typ = errorType(c)
|
||||||
renderTree(result, {renderNoComments}))
|
|
||||||
result.typ = errorType(c)
|
|
||||||
else:
|
else:
|
||||||
if efNoProcvarCheck notin flags: semProcvarCheck(c, result)
|
if efNoProcvarCheck notin flags: semProcvarCheck(c, result)
|
||||||
if result.typ.kind == tyVar: result = newDeref(result)
|
if result.typ.kind == tyVar: result = newDeref(result)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue