bugfixes
This commit is contained in:
parent
0991706d55
commit
3aa36a8568
4 changed files with 19 additions and 3 deletions
|
|
@ -1146,6 +1146,12 @@ proc semProcBody(c: PContext, n: PNode): PNode =
|
|||
# discard it. This is bad for chaining but nicer for C wrappers.
|
||||
# ambiguous :-(
|
||||
result.typ = nil
|
||||
elif result.kind == nkStmtListExpr and result.typ.kind == tyNil:
|
||||
# to keep backwards compatibility bodies like:
|
||||
# nil
|
||||
# # comment
|
||||
# are not expressions:
|
||||
fixNilType(result)
|
||||
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