bugfix: proc bodies as expr
This commit is contained in:
parent
92e49aeaaf
commit
83b90b941b
1 changed files with 4 additions and 1 deletions
|
|
@ -1077,6 +1077,9 @@ proc semProcBody(c: PContext, n: PNode): PNode =
|
|||
# ``result``:
|
||||
if result.kind == nkSym and result.sym == c.p.resultSym:
|
||||
nil
|
||||
elif result.kind == nkNilLit:
|
||||
# ambiguous :-(
|
||||
result.typ = nil
|
||||
else:
|
||||
var a = newNodeI(nkAsgn, n.info, 2)
|
||||
a.sons[0] = newSymNode(c.p.resultSym)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue