Skip to content

Scaladoc: Fix missing known subtypes #13794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,10 @@ trait ClassLikeSupport:
def getParentsAsTreeSymbolTuples: List[(Tree, Symbol)] =
for
parentTree <- c.parents if isValidPos(parentTree.pos) // We assume here that order is correct
parentSymbol = if parentTree.symbol.isClassConstructor then parentTree.symbol.owner else parentTree.symbol
parentSymbol = parentTree match
case t: TypeTree => t.tpe.typeSymbol
case tree if tree.symbol.isClassConstructor => tree.symbol.owner
case tree => tree.symbol
if parentSymbol != defn.ObjectClass && parentSymbol != defn.AnyClass
yield (parentTree, parentSymbol)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package transformers

class InheritanceInformationTransformer(using DocContext) extends (Module => Module):
override def apply(original: Module): Module =
val subtypes = getSupertypes(original.rootPackage).groupBy(_._1).transform((k, v) => v.map(_._2))
val subtypes = getSupertypes(original.rootPackage).groupMap(_(0))(_(1))
original.updateMembers { m =>
val edges = getEdges(m.asLink.copy(kind = bareClasslikeKind(m.kind)), subtypes)
val st: Seq[LinkToType] = edges.map(_._1).distinct
Expand Down