diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-07-16 15:51:53 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-08-19 15:37:30 +0200 |
commit | 00ea4fc5f46ebc984ac68a463b3a87d553a2c2f4 (patch) | |
tree | 66904d183b0e698e9088806d256d8a014cf0eaaa /dottydoc/shared | |
parent | 61169c03c78af7fff428d20f3249e2de2d21fd96 (diff) | |
download | dotty-00ea4fc5f46ebc984ac68a463b3a87d553a2c2f4.tar.gz dotty-00ea4fc5f46ebc984ac68a463b3a87d553a2c2f4.tar.bz2 dotty-00ea4fc5f46ebc984ac68a463b3a87d553a2c2f4.zip |
Rebase dottydoc over new HK scheme
Diffstat (limited to 'dottydoc/shared')
-rw-r--r-- | dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/factories.scala | 15 |
1 files changed, 12 insertions, 3 deletions
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 { |