Scala Constructor Inheritance of InheritDoc?
<p>I'm writing some documentation for my exception classes and am running into the following warning from scaladoc: </p>

<blockquote>
  <p>The comment for class BarException contains @inheritdoc, but no parent comment is available to inherit from.</p>
</blockquote>

<p>After reading <a href="https://stackoverflow.com/questions/14402275/javadoc-inheriting-parent-constructors-documentation">this Java question</a> I have to imagine that the reason for this is because I want to inherit documentation on the constructor method and not just a normal method: </p>

<pre><code>/** Base Exception
 *
 *  @param msg A message describing this exception
 *  @param cause The exception which is the underlying cause to this FooException, null if this is the underlying cause
 */
abstract class FooException(val msg: String, val cause: Throwable) extends RuntimeException(msg, cause)

/** The bar exception specific docs, expect msg &amp; cause to be given same docs as FooException
 *  @inheritdoc
 */
case class BarException(override val msg: String, override val cause: Throwable) extends FooException(msg, cause)
</code></pre>

<p><a href="https://i.stack.imgur.com/x7yWq.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x7yWq.jpg" alt="Parent Documentation Screenshot"></a>
<a href="https://i.stack.imgur.com/MvwLF.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MvwLF.jpg" alt="Child Documentation Screenshot"></a></p>

<p>I understand that there's no override of the constructor, and so nothing to inherit from for that. But, That said, if I look at the generated documentation for the parent <code>FooException</code> I see that not only does the constructor have the arguments documented as expected, but also the fields of <code>msg</code> and <code>cause</code> are documented too. Which seems to imply to me that scaladoc has taken the <code>@param</code> and applied it to my fields for <code>FooException</code> in addition to using it as the method param documentation</p>

<p>Since I have to <code>override</code> in the case class constructor of <code>BarException</code>, I'd expect scaladoc to understand that there is something being overridden and therefore something to inherit documentation from, but this isn't the case. I've looked through the <a href="https://wiki.scala-lang.org/display/SW/Tags+and+Annotations" rel="nofollow noreferrer">scala tags wiki</a> but haven't found anything about this behavior or how to get the documentation to inherit from the properties in the parent class to the children. </p>

<p>If I change the class to use <code>def</code> then I can inherit documentation onto the fields of the children, but I have to repeat myself:</p>

<pre><code>/** Base Exception
 *
 *  @param msg A message describing this exception
 *  @param cause The exception which is the underlying cause to this FooException, null if this is the underlying cause
 */
abstract class FooException(msg: String, cause: Throwable) extends RuntimeException(msg, cause) {

    /** A message describing this exceptionxx */
    def msg: String

    /** The exception which is the underlying cause to this FooException, null if this is the underlying cause */
    def cause: Throwable
}
</code></pre>

<p>Is there anyway to not use the <code>def</code> format in the abstract class and just inherit the documentation to the child that scaladoc is already producing for the generated properties of the parent class?</p>