aboutsummaryrefslogtreecommitdiff
path: root/dottydoc
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-07-16 15:51:53 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-08-19 15:37:30 +0200
commit00ea4fc5f46ebc984ac68a463b3a87d553a2c2f4 (patch)
tree66904d183b0e698e9088806d256d8a014cf0eaaa /dottydoc
parent61169c03c78af7fff428d20f3249e2de2d21fd96 (diff)
downloaddotty-00ea4fc5f46ebc984ac68a463b3a87d553a2c2f4.tar.gz
dotty-00ea4fc5f46ebc984ac68a463b3a87d553a2c2f4.tar.bz2
dotty-00ea4fc5f46ebc984ac68a463b3a87d553a2c2f4.zip
Rebase dottydoc over new HK scheme
Diffstat (limited to 'dottydoc')
-rw-r--r--dottydoc/jvm/src/dotty/tools/dottydoc/core/DocASTPhase.scala2
-rw-r--r--dottydoc/jvm/src/dotty/tools/dottydoc/core/DocImplicitsPhase.scala2
-rw-r--r--dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/factories.scala15
3 files changed, 14 insertions, 5 deletions
diff --git a/dottydoc/jvm/src/dotty/tools/dottydoc/core/DocASTPhase.scala b/dottydoc/jvm/src/dotty/tools/dottydoc/core/DocASTPhase.scala
index 72e679565..a2d440e8c 100644
--- a/dottydoc/jvm/src/dotty/tools/dottydoc/core/DocASTPhase.scala
+++ b/dottydoc/jvm/src/dotty/tools/dottydoc/core/DocASTPhase.scala
@@ -56,7 +56,7 @@ class DocASTPhase extends Phase {
}
def addedFromSymbol(sym: Symbol): List[Entity] = {
- val defs = sym.info.membersBasedOnFlags(Flags.Method, Flags.Synthetic | Flags.Private).map { meth =>
+ val defs = sym.info.bounds.hi.membersBasedOnFlags(Flags.Method, Flags.Synthetic | Flags.Private).map { meth =>
track(meth.symbol, ctx) {
DefImpl(meth.symbol.name.decode.toString, Nil, path(meth.symbol), returnType(meth.info), typeParams(meth.symbol), paramLists(meth.info))
}
diff --git a/dottydoc/jvm/src/dotty/tools/dottydoc/core/DocImplicitsPhase.scala b/dottydoc/jvm/src/dotty/tools/dottydoc/core/DocImplicitsPhase.scala
index 084764856..5d53d6397 100644
--- a/dottydoc/jvm/src/dotty/tools/dottydoc/core/DocImplicitsPhase.scala
+++ b/dottydoc/jvm/src/dotty/tools/dottydoc/core/DocImplicitsPhase.scala
@@ -18,7 +18,7 @@ class DocImplicitsPhase extends MiniPhaseTransform { thisTransformer =>
tree.vparamss.length > 0 &&
tree.vparamss(0).length == 1 // should only take one arg, since it has to be a transformation
) {
- val convertee = tree.vparamss(0)(0).symbol.info.widenDealias.finalResultType.typeSymbol//denot.typeRef // the pimped type (i.e. `class`)
+ val convertee = tree.vparamss(0)(0).symbol.info.widenDealias.finalResultType.typeSymbol // the pimped type (i.e. `class`)
ctx.base.addDef(convertee, tree.symbol.info.widenDealias.finalResultType.typeSymbol)
}
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 72e52a96f..ef4854979 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
@@ -55,8 +55,8 @@ object factories {
}
def expandTpe(t: Type, params: List[MaterializableLink] = Nil): Reference = t match {
- case ref @ RefinedType(parent, rn) => {
- val paramName = (ref.refinedInfo match {
+ case ref @ RefinedType(parent, rn, info) => {
+ val paramName = (info match {
case ta: TypeAlias if ta.alias.isInstanceOf[NamedType] =>
ta.alias.asInstanceOf[NamedType].name.show
case _ => rn.show
@@ -64,6 +64,15 @@ object factories {
val param = UnsetLink(paramName, paramName)
expandTpe(parent, param :: params)
}
+ case HKApply(tycon, args) =>
+ def paramName: Type => String = { tpe =>
+ (tpe match {
+ case ta: TypeAlias if ta.alias.isInstanceOf[NamedType] =>
+ ta.alias.asInstanceOf[NamedType].name.show
+ case _ => tpe.show
+ }).split("\\$").last
+ }
+ expandTpe(tycon, args.map(paramName).map(x => UnsetLink(x,x)))
case TypeRef(_, n) =>
val name = n.decode.toString.split("\\$").last
typeRef(name, params = params)
@@ -118,7 +127,7 @@ object factories {
case annot: AnnotatedType => paramLists(annot.tpe)
case (_: PolyParam | _: RefinedType | _: TypeRef | _: ThisType |
- _: ExprType | _: OrType | _: AndType) => Nil // return types should not be in the paramlist
+ _: ExprType | _: OrType | _: AndType | _: HKApply) => Nil // return types should not be in the paramlist
}
def superTypes(t: Tree)(implicit ctx: Context): List[MaterializableLink] = t.symbol.denot match {