mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-29 10:01:39 +00:00
bugfixes
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user