Skip to content

Commit 4f8be7d

Browse files
authored
Merge pull request #13236 from KacperFKorban/scaladoc/fix-CI
Fix scaladoc CI
2 parents 1413dab + db83f51 commit 4f8be7d

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

scaladoc/src/dotty/tools/scaladoc/tasty/ClassLikeSupport.scala

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,11 @@ trait ClassLikeSupport:
254254
dd.symbol.extendedSymbol.map { extSym =>
255255
val memberInfo = unwrapMemberInfo(c, dd.symbol)
256256
val typeParams = dd.symbol.extendedTypeParams.map(mkTypeArgument(_, memberInfo.genericTypes))
257-
val termParams = dd.symbol.extendedTermParamLists.zipWithIndex.map { case (paramList, index) =>
258-
ParametersList(paramList.params.map(mkParameter(_, memberInfo = memberInfo.paramLists(index))), paramListModifier(paramList.params))
257+
val termParams = dd.symbol.extendedTermParamLists.zipWithIndex.flatMap { case (paramList, index) =>
258+
memberInfo.paramLists(index) match
259+
case EvidenceOnlyParameterList => Nil
260+
case info: RegularParameterList =>
261+
Seq(ParametersList(paramList.params.map(mkParameter(_, memberInfo = info)), paramListModifier(paramList.params)))
259262
}
260263
val target = ExtensionTarget(
261264
extSym.symbol.normalizedName,
@@ -630,13 +633,13 @@ trait ClassLikeSupport:
630633
def unwrapMemberInfo(c: ClassDef, symbol: Symbol): MemberInfo =
631634
val baseTypeRepr = memberInfo(c, symbol)
632635

633-
def isSyntheticEvidence(name: String) =
636+
def isSyntheticEvidence(name: String) =
634637
if !name.startsWith(NameKinds.EvidenceParamName.separator) then false else
635638
// This assumes that every parameter that starts with `evidence$` and is implicit is generated by compiler to desugar context bound.
636-
// Howrever, this is just a heuristic, so
637-
// `def foo[A](evidence$1: ClassTag[A]) = 1`
639+
// Howrever, this is just a heuristic, so
640+
// `def foo[A](evidence$1: ClassTag[A]) = 1`
638641
// will be documented as
639-
// `def foo[A: ClassTag] = 1`.
642+
// `def foo[A: ClassTag] = 1`.
640643
// Scala spec states that `$` should not be used in names and behaviour may be undefiend in such case.
641644
// Documenting method slightly different then its definition is withing the 'undefiend behaviour'.
642645
symbol.paramSymss.flatten.find(_.name == name).exists(_.flags.is(Flags.Implicit))
@@ -647,7 +650,7 @@ trait ClassLikeSupport:
647650
def handleMethodType(memberInfo: MemberInfo, methodType: MethodType): MemberInfo =
648651
val rawParams = methodType.paramNames.zip(methodType.paramTypes).toMap
649652
val (evidences, notEvidences) = rawParams.partition(e => isSyntheticEvidence(e._1))
650-
653+
651654

652655
def findParamRefs(t: TypeRepr): Seq[ParamRef] = t match
653656
case paramRef: ParamRef => Seq(paramRef)
@@ -665,7 +668,7 @@ trait ClassLikeSupport:
665668
case (_, AppliedType(tpe, List(typeParam: ParamRef))) =>
666669
Right(nameForRef(typeParam) -> tpe.asSignature)
667670
case (name, original) =>
668-
findParamRefs(original) match
671+
findParamRefs(original) match
669672
case Nil => Left((name, original))
670673
case typeParam :: _ =>
671674
val name = nameForRef(typeParam)

0 commit comments

Comments
 (0)