You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this.type should be rendered as this.type, not Tuple. The two have very different meanings. I am not sure whether other singleton types are rendered correctly, we should check that as well.
The text was updated successfully, but these errors were encountered:
This PR introduces multiple fixes and improvements to type rendering in
Scaladoc
- Fixed rendering of TypeRefs (`A#B`) and TermRefs (`a.b.type`)
- Fixed rendering of `Tuple1[T]` (previously `(T)`)
- Fixed rendering of `this.type` (except for type bounds, see below)
- Types with `@showAsInfix` are rendered infix
- Correct parenthesizing around infix types, `&` types, `|` types and
function types
- Type parameters of superclasses in inherited methods are substituted
with actual types from inheriting class/trait (see
`scaladoc-testcases/src/tests/supertypeParamsSubstitution.scala`)
https://github.com/lampepfl/dotty/pull/17213/files#diff-93a78912075a9fdb34fefa437d191be59888cb723ccb244374e77033d9eca779R12-R20
- `this` and `type` are highlighted as keywords
fixes#16024fixes#16143fixed#16057fixes#16084 (partially) - fixed rendering of `Int` instead of `n.type`
and `(This, n.type)` instead of `Split[This, n.type]`. `this.type` in
type bounds remains unfixed. I created separate issue for that #17226
Documentation with those changes has been deployed to
https://scala3doc.virtuslab.com/pr-types-rendering-fixes/scala3/api/index.html
Compiler version
3.2.1 RC-1
Minimized example
In Tuple.scala:
Output
Scaladoc output:
def map[F[_]](f: [t] => (x$1: t) => F[t]): Map[Tuple, F]
Expectation
this.type
should be rendered asthis.type
, notTuple
. The two have very different meanings. I am not sure whether other singleton types are rendered correctly, we should check that as well.The text was updated successfully, but these errors were encountered: