Fix doc comment rendering for concepts (#22312)

This commit is contained in:
konsumlamm
2023-07-22 19:10:12 +02:00
committed by GitHub
parent 3ebe24977c
commit 576f4a7348
2 changed files with 2 additions and 2 deletions

View File

@@ -440,7 +440,7 @@ proc genRecCommentAux(d: PDoc, n: PNode): PRstNode =
if n == nil: return nil
result = genComment(d, n)
if result == nil:
if n.kind in {nkStmtList, nkStmtListExpr, nkTypeDef, nkConstDef,
if n.kind in {nkStmtList, nkStmtListExpr, nkTypeDef, nkConstDef, nkTypeClassTy,
nkObjectTy, nkRefTy, nkPtrTy, nkAsgn, nkFastAsgn, nkSinkAsgn, nkHiddenStdConv}:
# notin {nkEmpty..nkNilLit, nkEnumTy, nkTupleTy}:
for i in 0..<n.len:

View File

@@ -1,3 +1,3 @@
type Foo = concept
type Foo* = concept
## doc comment
proc foo(x: Self)