scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

scaladoc ambiguous error #10242

Open scabug opened 7 years ago

scabug commented 7 years ago
  def * = ???
  def + = ???

  /**
    * [[*]]
    */
  val a = 1

run sbt doc then got

[warn]The link target "*" is ambiguous. Several members fit the target:
[warn] package com [chosen]
[warn] package _root_
[warn] package _root_
[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.
[warn]   /**
[warn]   ^
[warn] two warnings found
[info] Main Scala API documentation successful.
[success] Total time: 8 s, completed 2017-3-21 16:39:45
scabug commented 7 years ago

Imported From: https://issues.scala-lang.org/browse/SI-10242?orig=1 Reporter: 张志豪 (zhangzhihao)