-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
When writing scaladoc for an overrided member, it is convenient to be able to inherit the existing docs and extend them. Currently, it appears that you can either inherit or provide your own, but not merge the two. The simplest way I can think to address this is as follows:
trait Foo {
/** Do interesting stuff. */
def doStuff()
}
trait Bar {
/** Actually does quite boring stuff. */
override def doStuff()
}
trait Baz {
/**
* We make use of pixie magic to do stuff.
*/
override def doStuff()
}
The scaladoc for Foo.doStuff() would be "Do interesting stuff." and the scaladoc for Bar.doStuff() would be "Actually does quite boring stuff.". However, the scaladoc for Baz would be:
Do interesting stuff.
We make use of pixie magic to do stuff.
So, the rule is that if the scaladoc starts on the /**
line, it is treated as the documentation. If the /**
line is blank, the inherited docs are inserted followed by these docs.