aboutsummaryrefslogtreecommitdiff
path: root/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/factories.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-07-20 10:21:26 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-08-19 15:37:30 +0200
commit7d8458ff50f56cee13698ce933a295090680d11e (patch)
tree9fa4a8159a9aff3223c6d5c8b8ed3558425e7d3d /dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/factories.scala
parentfe1ff8f0570d3d582a884a9b8f35a14235c0c71f (diff)
downloaddotty-7d8458ff50f56cee13698ce933a295090680d11e.tar.gz
dotty-7d8458ff50f56cee13698ce933a295090680d11e.tar.bz2
dotty-7d8458ff50f56cee13698ce933a295090680d11e.zip
Add support for repeated parameters in producer
Diffstat (limited to 'dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/factories.scala')
-rw-r--r--dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/factories.scala9
1 files changed, 8 insertions, 1 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 a48f6d9b0..bd38701d9 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
@@ -50,6 +50,8 @@ object factories {
}
def returnType(t: Type)(implicit ctx: Context): Reference = {
+ val defn = ctx.definitions
+
def typeRef(name: String, query: String = "", params: List[Reference] = Nil) = {
val realQuery = if (query != "") query else name
TypeReference(name, UnsetLink(name, realQuery), params)
@@ -123,7 +125,12 @@ object factories {
case mt: MethodType =>
mt.paramNames.zip(mt.paramTypes).map { case (name, tpe) =>
- NamedReference(name.decode.toString, returnType(tpe), tpe.isInstanceOf[ExprType])
+ NamedReference(
+ name.decode.toString,
+ returnType(tpe),
+ isByName = tpe.isInstanceOf[ExprType],
+ isRepeated = tpe.isRepeatedParam
+ )
} :: paramLists(mt.resultType)
case annot: AnnotatedType => paramLists(annot.tpe)