Scaladoc: ambiguous member

Hello,

When using saladoc I get he following warning:

[warn] 
[warn] 
[warn] Quick crash course on using Scaladoc links
[warn] ==========================================
[warn] Disambiguating terms and types: Prefix terms with '$' and types with '!' in case both names are in use:
[warn]  - [[scala.collection.immutable.List!.apply class List's apply method]] and
[warn]  - [[scala.collection.immutable.List$.apply object List's apply method]]
[warn] Disambiguating overloaded members: If a term is overloaded, you can indicate the first part of its signature followed by *:
[warn]  - [[[scala.collection.immutable.List$.fill[A](Int)(⇒A):List[A]* Fill with a single parameter]]]
[warn]  - [[[scala.collection.immutable.List$.fill[A](Int,Int)(⇒A):List[List[A]]* Fill with a two parameters]]]
[warn] Notes:
[warn]  - you can use any number of matching square brackets to avoid interference with the signature
[warn]  - you can use \\. to escape dots in prefixes (don't forget to use * at the end to match the signature!)
[warn]  - you can use \\# to escape hashes, otherwise they will be considered as delimiters, like dots.

I tried several times to get this working and could not. So I finally created a scaladoc entry with:

 [[[scala.collection.immutable.List$.fill[A](Int)(=>A):List[A]* Fill with a single parameter]]]
 

And I still get the error:

 Could not find any member to link for "scala.collection.immutable.List$.fill[A](Int)(=>A):List[A]*".

So how should one disambiguate (using 2.12.3 + sbt) ?

TIA

Sorry for the late response … here you have some tips about it →

https://docs.scala-lang.org/overviews/scaladoc/for-library-authors.html#resolving-ambiguous-links-within-scaladoc-comments

1 Like

I, too, thought I would just buckle down and follow the instructions, only to wind up with the same frustrating errors. If there is a way to make it work, one can say at least that it is not sufficiently accessible.

Happily, someone removed the “quick crash course” at some point, so that we are no longer subjected to that mockery (that is to say, it mocks us).

1 Like