summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-12-05 23:28:35 +0100
committerAraq <rumpf_a@web.de>2012-12-05 23:28:35 +0100
commit6431e602160a5f2e1323a057e9c0166431e5a002 (patch)
tree920fea002eb191d1712c01bc6f5e5d62b71c8d21 /compiler
parentc5826ec1fb747207573b1289b340d6243012f67f (diff)
downloadNim-6431e602160a5f2e1323a057e9c0166431e5a002.tar.gz
fixes #269
Diffstat (limited to 'compiler')
-rwxr-xr-xcompiler/docgen.nim3
-rwxr-xr-xcompiler/semstmts.nim2
2 files changed, 5 insertions, 0 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim
index e06277f91..aff77cc1f 100755
--- a/compiler/docgen.nim
+++ b/compiler/docgen.nim
@@ -145,6 +145,9 @@ proc isVisible(n: PNode): bool =
       var v = n.sons[0].ident
       result = v.id == ord(wStar) or v.id == ord(wMinus)
   elif n.kind == nkSym:
+    # we cannot generate code for forwarded symbols here as we have no
+    # exception tracking information here. Instead we copy over the comment
+    # from the proc header.
     result = {sfExported, sfFromGeneric, sfForward}*n.sym.flags == {sfExported}
   elif n.kind == nkPragmaExpr:
     result = isVisible(n.sons[0])
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index 8b55058bb..68d485f48 100755
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -780,6 +780,8 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
     n.sons[pragmasPos] = proto.ast.sons[pragmasPos]
     if n.sons[namePos].kind != nkSym: InternalError(n.info, "semProcAux")
     n.sons[namePos].sym = proto
+    if gCmd == cmdDoc and not isNil(proto.ast.comment):
+      n.comment = proto.ast.comment
     proto.ast = n             # needed for code generation
     popOwner()
     pushOwner(s)