fixes #269
This commit is contained in:
parent
c5826ec1fb
commit
6431e60216
2 changed files with 5 additions and 0 deletions
|
|
@ -145,6 +145,9 @@ proc isVisible(n: PNode): bool =
|
||||||
var v = n.sons[0].ident
|
var v = n.sons[0].ident
|
||||||
result = v.id == ord(wStar) or v.id == ord(wMinus)
|
result = v.id == ord(wStar) or v.id == ord(wMinus)
|
||||||
elif n.kind == nkSym:
|
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}
|
result = {sfExported, sfFromGeneric, sfForward}*n.sym.flags == {sfExported}
|
||||||
elif n.kind == nkPragmaExpr:
|
elif n.kind == nkPragmaExpr:
|
||||||
result = isVisible(n.sons[0])
|
result = isVisible(n.sons[0])
|
||||||
|
|
|
||||||
|
|
@ -780,6 +780,8 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
|
||||||
n.sons[pragmasPos] = proto.ast.sons[pragmasPos]
|
n.sons[pragmasPos] = proto.ast.sons[pragmasPos]
|
||||||
if n.sons[namePos].kind != nkSym: InternalError(n.info, "semProcAux")
|
if n.sons[namePos].kind != nkSym: InternalError(n.info, "semProcAux")
|
||||||
n.sons[namePos].sym = proto
|
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
|
proto.ast = n # needed for code generation
|
||||||
popOwner()
|
popOwner()
|
||||||
pushOwner(s)
|
pushOwner(s)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue