Skip to content

Commit 6e5be23

Browse files
Fix: Remove the duplicate parameter when generating the scaladoc. (#17097)
When generating Scaladoc, a duplicate of the parameter appears at the beginning of each signature. The solution here was to remove this line, as the parameter is already present in the argsSig value. Before : <img width="300" alt="Screenshot 2023-03-13 at 15 25 43" src="https://user-images.githubusercontent.com/44496264/224735195-8ff3f79a-83d9-4fa0-a5af-99da5aa30b9c.png"> After : <img width="300" alt="Screenshot 2023-03-13 at 15 24 05" src="https://user-images.githubusercontent.com/44496264/224735171-3eb67419-8b98-499e-a180-58202b54826b.png"> I didn't do a test because I don't think there is one (or I couldn't find it). But if needed, a next PR or a next commit to add them can be done. Fixes: #16647
2 parents b625340 + d9c7f29 commit 6e5be23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scaladoc/src/dotty/tools/scaladoc/renderers/MemberRenderer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ class MemberRenderer(signatureRenderer: SignatureRenderer)(using DocContext) ext
414414
val argsSig = SignatureBuilder()
415415
.functionTermParameters(on.argsLists)
416416
.content
417-
val sig = typeSig ++ Signature(Plain(s"(${on.name}: ")) ++ on.signature ++ Signature(Plain(")")) ++ argsSig
417+
val sig = typeSig ++ argsSig
418418
MGroup(span(cls := "groupHeader")(sig.map(renderElement(_))), members.sortBy(_.name).toSeq, on.name) -> on.position
419419
}.toSeq.sortBy(_._2).map(_._1)
420420

0 commit comments

Comments
 (0)