diff options
author | konsumlamm <44230978+konsumlamm@users.noreply.github.com> | 2023-07-22 19:10:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-22 19:10:12 +0200 |
commit | 576f4a73483a5d3b4c600f6d3d3c85394ffb43ee (patch) | |
tree | 4ac46120fc100b833da5aaeb39b75d4e57d63810 | |
parent | 3ebe24977ce93ca3c347550c69dbfa7c9a7db507 (diff) | |
download | Nim-576f4a73483a5d3b4c600f6d3d3c85394ffb43ee.tar.gz |
Fix doc comment rendering for concepts (#22312)
-rw-r--r-- | compiler/docgen.nim | 2 | ||||
-rw-r--r-- | tests/concepts/t20237.nim | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim index 829d86dfd..5120b5223 100644 --- a/compiler/docgen.nim +++ b/compiler/docgen.nim @@ -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: diff --git a/tests/concepts/t20237.nim b/tests/concepts/t20237.nim index db9002421..175c7a9d1 100644 --- a/tests/concepts/t20237.nim +++ b/tests/concepts/t20237.nim @@ -1,3 +1,3 @@ -type Foo = concept +type Foo* = concept ## doc comment proc foo(x: Self) |