scala / scala3

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

Scaladoc incorrectly creates method signatures from extensions #14811

Closed rochala closed 2 years ago

rochala commented 2 years ago

Compiler version

3.1.2-RC2

Minimized example

Generated documentation for methods from extensions have signatures without parameters.

class A

extension (a: A) def fun(x: Int) = x + 1

Output

image

Expectation

Output should show proper signature for method fun. In this example it should be: def fun(x: Int): Int

prolativ commented 2 years ago

This seems to be working correctly with the newest docs, e.g. https://dotty.epfl.ch/api/scala/IArray$.html#partition-ffffffff

rochala commented 2 years ago

https://dotty.epfl.ch/api/scala/IArray$.html#partition-ffffffff this is not method which is accessible via extension, but this is declaration of extension. I can't find such usage in existing documentation, but still it doesn't work properly as it does for implicitly added methods https://dotty.epfl.ch/api/scala/Int.html#+-ffffffb7