lampepfl / scala3doc

16 stars 6 forks source link

we should include documentation from overriden member when new one is not provided #251

Closed romanowski closed 3 years ago

romanowski commented 3 years ago

In case like below in scaladoc:

trait A:
 /**
   * A doc for foo
   */
 def foo: Int

class B extends A:
 override def foo = 123

B.foo will have documentation (A doc for foo) from parent included. Shoudl scala3doc do the same?

romanowski commented 3 years ago

documentation should inherit both main text and each parameters if not defined.

abgruszecki commented 3 years ago

Are you certain that Scaladoc duplicates documentation like that? There's a special @inheritdoc "instruction" in Scaladoc that manually tells it to copy overriden definition's doc, and I've seen it applied by itself, which makes me think inheriting doc is not the default behaviour.