diff options
author | LemonBoy <thatlemon@gmail.com> | 2018-09-19 21:17:48 +0200 |
---|---|---|
committer | LemonBoy <thatlemon@gmail.com> | 2018-09-21 18:59:46 +0200 |
commit | 4d9aec1858ecd8651276a5e1d6ca939d345b4d11 (patch) | |
tree | 1130641e6c7fd2b60680df3ac8e1415fb928f7dd /compiler/semstmts.nim | |
parent | 0951b5b73677f610fd0eb8c274fc540349138d9c (diff) | |
download | Nim-4d9aec1858ecd8651276a5e1d6ca939d345b4d11.tar.gz |
Revert #7964
Somehow the test case doesn't crash anymore and the regression in the doc generation is fixed. Fixes #9019
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r-- | compiler/semstmts.nim | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 87d144dc6..75a4198a5 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -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: |