Revert #7964
Somehow the test case doesn't crash anymore and the regression in the doc generation is fixed. Fixes #9019
This commit is contained in:
parent
0951b5b736
commit
4d9aec1858
6 changed files with 59 additions and 13 deletions
|
|
@ -495,12 +495,8 @@ proc semVarOrLet(c: PContext, n: PNode, symkind: TSymKind): PNode =
|
|||
# keep documentation information:
|
||||
b.comment = a.comment
|
||||
addSon(b, newSymNode(v))
|
||||
# keep type desc for doc generator, but only if the user explicitly
|
||||
# added it
|
||||
if a.sons[length-2].kind != nkEmpty:
|
||||
addSon(b, newNodeIT(nkType, a.info, typ))
|
||||
else:
|
||||
addSon(b, a.sons[length-2])
|
||||
# keep type desc for doc generator
|
||||
addSon(b, a.sons[length-2])
|
||||
addSon(b, copyTree(def))
|
||||
addToVarSection(c, result, n, b)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue