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:
619
619
620
620
def isSyntheticEvidence (name : String ) =
621
621
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'.
622
629
symbol.paramSymss.flatten.find(_.name == name).exists(_.flags.is(Flags .Implicit ))
623
630
624
631
def handlePolyType (polyType : PolyType ): MemberInfo =
Original file line number Diff line number Diff line change @@ -51,8 +51,6 @@ abstract class SignatureTest(
51
51
val unexpectedReport = Option .when(! unexpected.isEmpty)
52
52
(s " Unexpectedly documented signatures: \n ${unexpected.mkString(" \n " )}" )
53
53
54
- println(" Expecting following signatures: " + expectedFromSources)
55
-
56
54
val reports = missingReport ++ unexpectedReport
57
55
58
56
if ! reports.isEmpty then
You can’t perform that action at this time.
0 commit comments