diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala | 3 | ||||
-rw-r--r-- | test/scaladoc/resources/SI_4676.scala | 4 | ||||
-rw-r--r-- | test/scaladoc/scala/html/HtmlFactoryTest.scala | 9 |
3 files changed, 15 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala b/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala index 45303744cf..3c3556fefc 100644 --- a/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala +++ b/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala @@ -577,8 +577,9 @@ class ModelFactory(val global: Global, val settings: doc.Settings) { nameBuffer append "⇒ " appendType0(tp.args.head) case tp: TypeRef if definitions.isTupleTypeOrSubtype(tp) => + val args = tp.normalize.typeArgs nameBuffer append '(' - appendTypes0(tp.args, ", ") + appendTypes0(args, ", ") nameBuffer append ')' case TypeRef(pre, aSym, targs) => val preSym = pre.widen.typeSymbol diff --git a/test/scaladoc/resources/SI_4676.scala b/test/scaladoc/resources/SI_4676.scala new file mode 100644 index 0000000000..00c0fc7ea9 --- /dev/null +++ b/test/scaladoc/resources/SI_4676.scala @@ -0,0 +1,4 @@ +class SI_4676 { + type SS = (String,String) + def x(ss: SS): Int = 3 +} diff --git a/test/scaladoc/scala/html/HtmlFactoryTest.scala b/test/scaladoc/scala/html/HtmlFactoryTest.scala index 4fcd4136d2..f3973fa7c9 100644 --- a/test/scaladoc/scala/html/HtmlFactoryTest.scala +++ b/test/scaladoc/scala/html/HtmlFactoryTest.scala @@ -344,4 +344,13 @@ object Test extends Properties("HtmlFactory") { case _ => false } } + + property("Shouldn't drop type arguments to aliased tuple.") = { + createTemplate("SI_4676.scala") match { + case node: scala.xml.Node => { + node.toString.contains(">ss: (String, String)<") + } + case _ => false + } + } } |