aboutsummaryrefslogtreecommitdiff
path: root/dottydoc/shared
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-07-11 13:30:53 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-08-19 15:37:29 +0200
commit7d8dadeffe73ebe6bbf094c7e2ca3ee9d18528fd (patch)
treedbf5a7f001327a667f59f5d53b4c786a10e48f81 /dottydoc/shared
parent5e88fe39ac7ac1422a13af39428143215297d23f (diff)
downloaddotty-7d8dadeffe73ebe6bbf094c7e2ca3ee9d18528fd.tar.gz
dotty-7d8dadeffe73ebe6bbf094c7e2ca3ee9d18528fd.tar.bz2
dotty-7d8dadeffe73ebe6bbf094c7e2ca3ee9d18528fd.zip
Implement by name in parameter lists
Diffstat (limited to 'dottydoc/shared')
-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.scala2
2 files changed, 2 insertions, 2 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 526eff50c..d7ad4de71 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
@@ -103,5 +103,5 @@ sealed trait Reference
final case class TypeReference(title: String, tpeLink: MaterializableLink, paramLinks: List[MaterializableLink]) 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) extends Reference
+final case class NamedReference(title: String, ref: Reference, isByName: Boolean = false) extends Reference
final case class ConstantReference(title: String) 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 452c1a3b4..72e52a96f 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
@@ -113,7 +113,7 @@ object factories {
case mt: MethodType =>
mt.paramNames.zip(mt.paramTypes).map { case (name, tpe) =>
- NamedReference(name.decode.toString, returnType(tpe))
+ NamedReference(name.decode.toString, returnType(tpe), tpe.isInstanceOf[ExprType])
} :: paramLists(mt.resultType)
case annot: AnnotatedType => paramLists(annot.tpe)