aboutsummaryrefslogtreecommitdiff
path: root/dottydoc/jvm/src/dotty/tools/dottydoc/core/TypeLinkingPhases.scala
diff options
context:
space:
mode:
Diffstat (limited to 'dottydoc/jvm/src/dotty/tools/dottydoc/core/TypeLinkingPhases.scala')
-rw-r--r--dottydoc/jvm/src/dotty/tools/dottydoc/core/TypeLinkingPhases.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/dottydoc/jvm/src/dotty/tools/dottydoc/core/TypeLinkingPhases.scala b/dottydoc/jvm/src/dotty/tools/dottydoc/core/TypeLinkingPhases.scala
index e8c8790d9..7ce6b187b 100644
--- a/dottydoc/jvm/src/dotty/tools/dottydoc/core/TypeLinkingPhases.scala
+++ b/dottydoc/jvm/src/dotty/tools/dottydoc/core/TypeLinkingPhases.scala
@@ -37,6 +37,18 @@ class LinkParamListTypes extends DocMiniPhase with TypeLinker {
}
}
+class LinkImplicitlyAddedTypes extends DocMiniPhase with TypeLinker {
+ override def transformDef(implicit ctx: Context) = { case df: DefImpl if df.implicitlyAddedFrom.isDefined =>
+ val implicitlyAddedFrom = linkReference(df, df.implicitlyAddedFrom.get, ctx.docbase.packages[Package].toMap)
+ df.copy(implicitlyAddedFrom = Some(implicitlyAddedFrom))
+ }
+
+ override def transformVal(implicit ctx: Context) = { case vl: ValImpl if vl.implicitlyAddedFrom.isDefined =>
+ val implicitlyAddedFrom = linkReference(vl, vl.implicitlyAddedFrom.get, ctx.docbase.packages[Package].toMap)
+ vl.copy(implicitlyAddedFrom = Some(implicitlyAddedFrom))
+ }
+}
+
trait TypeLinker extends MemberLookup {
def linkReference(ent: Entity, ref: Reference, packs: Map[String, Package]): Reference = {
def linkRef(ref: Reference) = linkReference(ent, ref, packs)