File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/dotty/tools/scaladoc/tasty
test/dotty/tools/scaladoc/signatures Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -619,6 +619,13 @@ trait ClassLikeSupport:
619619
620620 def isSyntheticEvidence (name : String ) =
621621 if ! name.startsWith(NameKinds .EvidenceParamName .separator) then false else
622+ // This assumes that every parameter that starts with `evidence$` and is implicit is generated by compiler to desugar context bound.
623+ // Howrever, this is just a heuristic, so
624+ // `def foo[A](evidence$1: ClassTag[A]) = 1`
625+ // will be documented as
626+ // `def foo[A: ClassTag] = 1`.
627+ // Scala spec states that `$` should not be used in names and behaviour may be undefiend in such case.
628+ // Documenting method slightly different then its definition is withing the 'undefiend behaviour'.
622629 symbol.paramSymss.flatten.find(_.name == name).exists(_.flags.is(Flags .Implicit ))
623630
624631 def handlePolyType (polyType : PolyType ): MemberInfo =
Original file line number Diff line number Diff line change @@ -51,8 +51,6 @@ abstract class SignatureTest(
5151 val unexpectedReport = Option .when(! unexpected.isEmpty)
5252 (s " Unexpectedly documented signatures: \n ${unexpected.mkString(" \n " )}" )
5353
54- println(" Expecting following signatures: " + expectedFromSources)
55-
5654 val reports = missingReport ++ unexpectedReport
5755
5856 if ! reports.isEmpty then
You can’t perform that action at this time.
0 commit comments