scala / scala3

The Scala 3 compiler, also known as Dotty.
https://dotty.epfl.ch
Apache License 2.0
5.79k stars 1.04k forks source link

Scaladoc is years before the language and creates `opaque object`s #21228

Open KacperFKorban opened 1 month ago

KacperFKorban commented 1 month ago

Compiler version

3.6.0-RC1-bin-20240718-bd84584-NIGHTLY, 3.4.2

Minimized code

//> using scala 3.nightly
// opaqueobject.scala

object Sth:
  opaque type A = Int

scala-cli doc opaqueobject.scala

Output

The object documentation also gets an opaque modifier. The opaque type is documented correctly.

`opaque object` documentation

Expectation

The object documentation doesn't have an opaque modifier

odersky commented 1 month ago

It's not really opaque types. The compiler uses internally opaque as a flag for the object or class containing an opaque type. That won't change. It should be the job of the scaladoc to filter that out.