summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2018-09-19 21:17:48 +0200
committerLemonBoy <thatlemon@gmail.com>2018-09-21 18:59:46 +0200
commit4d9aec1858ecd8651276a5e1d6ca939d345b4d11 (patch)
tree1130641e6c7fd2b60680df3ac8e1415fb928f7dd /compiler/semstmts.nim
parent0951b5b73677f610fd0eb8c274fc540349138d9c (diff)
downloadNim-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.nim8
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: