I'm documenting a Scala class with overloaded methods. How can I distinguish them when referring to them in scaladoc comments? For example, if I have
/**
* The most important method is [[Doc.foo]].
*/
object Doc {
def foo[A]: A = throw new UnsupportedOperationException;
def foo[A,B >: A](x: A): B = x;
}
and run sbt doc
I get
Doc.scala:1: warning: The link target "Doc.foo" is ambiguous. Several (possibly overloaded) members fit the target:
- method
foo[A,B>:A](x:A):B
in object Doc [chosen]- method
foo[A]:Nothing
in object Doc
Using foo[A,B >: A]
etc. to the link doesn't work.