aboutsummaryrefslogtreecommitdiff
path: root/dottydoc
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-05-31 09:54:11 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-08-19 15:37:24 +0200
commit23465a357a84c024ba71f671e08ffc67586a662e (patch)
tree4cc8a3bad492685e6994b30a81adba67c9356014 /dottydoc
parent59055f28c7f6f3b01216ccbbd701e138101912d3 (diff)
downloaddotty-23465a357a84c024ba71f671e08ffc67586a662e.tar.gz
dotty-23465a357a84c024ba71f671e08ffc67586a662e.tar.bz2
dotty-23465a357a84c024ba71f671e08ffc67586a662e.zip
Improve return value filtering
Diffstat (limited to 'dottydoc')
-rw-r--r--dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/factories.scala3
1 files changed, 3 insertions, 0 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 ab6ff86d1..3e5745a18 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
@@ -44,6 +44,9 @@ object factories {
def returnType(t: Tree, tpt: TypeTree)(implicit ctx: Context): MaterializableLink = {
def cleanTitle(title: String): String = title match {
case x if x matches "[^\\[]+\\.this\\..+" => x.split("\\.").last
+ case x if x matches "[^\\[]+\\[[^\\]]+\\]" =>
+ val Array(tpe, params) = x.dropRight(1).split("\\[")
+ s"""$tpe[${params.split(",").map(x => cleanTitle(x.trim)).mkString(", ")}]"""
case _ => title
}