aboutsummaryrefslogtreecommitdiff
path: root/dottydoc/shared/src/main/scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-07-19 15:17:23 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-08-19 15:37:30 +0200
commita284cad4e58d48dd6fbaa0219bf00a2fd90e3d9d (patch)
tree41dbffde7690fea19cb81d34eba26a0a800f1589 /dottydoc/shared/src/main/scala
parent00ea4fc5f46ebc984ac68a463b3a87d553a2c2f4 (diff)
downloaddotty-a284cad4e58d48dd6fbaa0219bf00a2fd90e3d9d.tar.gz
dotty-a284cad4e58d48dd6fbaa0219bf00a2fd90e3d9d.tar.bz2
dotty-a284cad4e58d48dd6fbaa0219bf00a2fd90e3d9d.zip
Change TypeReference#paramLinks' type from `MaterializableLink` to `Reference`
Diffstat (limited to 'dottydoc/shared/src/main/scala')
-rw-r--r--dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/comment/BodyEntities.scala2
-rw-r--r--dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/factories.scala7
2 files changed, 5 insertions, 4 deletions
diff --git a/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/comment/BodyEntities.scala b/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/comment/BodyEntities.scala
index d7ad4de71..691661ac5 100644
--- a/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/comment/BodyEntities.scala
+++ b/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/comment/BodyEntities.scala
@@ -100,7 +100,7 @@ final case class MaterializedLink(title: String, target: String) extends Materia
final case class NoLink(title: String, target: String) extends MaterializableLink
sealed trait Reference
-final case class TypeReference(title: String, tpeLink: MaterializableLink, paramLinks: List[MaterializableLink]) extends Reference
+final case class TypeReference(title: String, tpeLink: MaterializableLink, paramLinks: List[Reference]) extends Reference
final case class OrTypeReference(left: Reference, right: Reference) extends Reference
final case class AndTypeReference(left: Reference, right: Reference) extends Reference
final case class NamedReference(title: String, ref: Reference, isByName: Boolean = false) extends Reference
diff --git a/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/factories.scala b/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/factories.scala
index ef4854979..8453b528f 100644
--- a/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/factories.scala
+++ b/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/factories.scala
@@ -4,6 +4,7 @@ package model
import comment._
import dotty.tools.dotc
import dotc.core.Types._
+import dotc.core.TypeApplications._
import dotc.core.Flags
import dotc.core.Contexts.Context
import dotc.core.Symbols.Symbol
@@ -49,7 +50,7 @@ object factories {
}
def returnType(t: Type)(implicit ctx: Context): Reference = {
- def typeRef(name: String, query: String = "", params: List[MaterializableLink] = Nil) = {
+ def typeRef(name: String, query: String = "", params: List[Reference] = Nil) = {
val realQuery = if (query != "") query else name
TypeReference(name, UnsetLink(name, realQuery), params)
}
@@ -76,6 +77,8 @@ object factories {
case TypeRef(_, n) =>
val name = n.decode.toString.split("\\$").last
typeRef(name, params = params)
+ case ta: TypeAlias =>
+ expandTpe(ta.alias.widenDealias)
case OrType(left, right) =>
OrTypeReference(expandTpe(left), expandTpe(right))
case AndType(left, right) =>
@@ -90,8 +93,6 @@ object factories {
expandTpe(tt.underlying)
case ci: ClassInfo =>
typeRef(ci.cls.show)
- case ta: TypeAlias =>
- expandTpe(ta.alias.widenDealias)
case mt: MethodType =>
expandTpe(mt.resultType)
case pt: PolyType =>