Skip to content

Commit 6a206ab

Browse files
Backport "scaladoc: Fix rendering of function-type aliases" to 3.7.4 (#24228)
Backports #24042 to the 3.7.4. PR submitted by the release tooling. [skip ci]
2 parents f38f384 + ff3035f commit 6a206ab

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scaladoc/src/dotty/tools/scaladoc/tasty/TypesSupport.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,12 @@ trait TypesSupport:
274274
++ inParens(inner(rhs, skipThisTypePrefix), shouldWrapInParens(rhs, t, false))
275275

276276
case t @ AppliedType(tpe, args) if t.isFunctionType =>
277-
functionType(tpe, args, skipThisTypePrefix)
277+
val dealiased = t.dealiasKeepOpaques
278+
if t == dealiased then
279+
functionType(tpe, args, skipThisTypePrefix)
280+
else
281+
val AppliedType(tpe, args) = dealiased.asInstanceOf[AppliedType]
282+
functionType(tpe, args, skipThisTypePrefix)
278283

279284
case t @ AppliedType(tpe, typeList) =>
280285
inner(tpe, skipThisTypePrefix) ++ plain("[").l ++ commas(typeList.map { t => t match

0 commit comments

Comments
 (0)