scala3 icon indicating copy to clipboard operation
scala3 copied to clipboard

ScalaDoc shows wrong type for this.type

Open odersky opened this issue 3 years ago • 1 comments

Compiler version

3.2.1 RC-1

Minimized example

In Tuple.scala:

  inline def map[F[_]](f: [t] => t => F[t]): Map[this.type, F] =
    runtime.Tuples.map(this, f).asInstanceOf[Map[this.type, F]]

Output

Scaladoc output:

def map[F[_]](f: [t] => (x$1: t) => F[t]): Map[Tuple, F]

Expectation

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.

odersky avatar Sep 12 '22 16:09 odersky

This rings a bell https://github.com/lampepfl/dotty/issues/15426 which is deemed fixed in June. Nightly docs shows that was fixed but not this report.

som-snytt avatar Sep 12 '22 17:09 som-snytt