From c11d98822e86b23b7c31429433fbb15cf94792c8 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Thu, 26 Sep 2013 12:05:47 +0200 Subject: SI-7876 Less dealiasing in Scaladoc's type printing. Scaladoc renders tuple and function types with the syntactic sugar. To do so, it was using `isFunctionType` and `isTupleType`. Internally, these methods dealias, so one can't simply take the type arguments from the given type to get the element types of the tuple. In ac96200c92, a Scaladoc crasher in this area was resolved by normalizing a type before extracting Tuple type arguments. Similar code already existed in the handling of FunctionTypes. This commit goes in the opposite direction, and instead queries the `direct` versions of those methods, which do not perform dealiasing. Conseqeuently, the type aliases that appear in the source code signatures for members will be rendered as such in Scaladoc. Which seems like an improvement. --- test/scaladoc/run/SI-4676.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/scaladoc/run/SI-4676.scala') diff --git a/test/scaladoc/run/SI-4676.scala b/test/scaladoc/run/SI-4676.scala index b83a59a472..99b3c5568a 100644 --- a/test/scaladoc/run/SI-4676.scala +++ b/test/scaladoc/run/SI-4676.scala @@ -21,6 +21,7 @@ object Test extends ScaladocModelTest { // check correct expansion of the use case signature val x = rootPackage._class("SI_4676")._method("x") - assert(x.valueParams(0)(0).resultType.name == "(String, String)", "parameter ss of method x has type (String, String") + val resultType = x.valueParams(0)(0).resultType.name + assert(resultType == "SS", s"parameter ss of method x has type $resultType, expected SS!") } } \ No newline at end of file -- cgit v1.2.3