fixes #2481
This commit is contained in:
parent
10c1d7f519
commit
49471440eb
4 changed files with 46 additions and 4 deletions
|
|
@ -31,7 +31,7 @@ proc semOperand(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
|
|||
if result.typ != nil:
|
||||
# XXX tyGenericInst here?
|
||||
if result.typ.kind == tyVar: result = newDeref(result)
|
||||
elif efWantStmt in flags:
|
||||
elif {efWantStmt, efAllowStmt} * flags != {}:
|
||||
result.typ = newTypeS(tyEmpty, c)
|
||||
else:
|
||||
localError(n.info, errExprXHasNoType,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue