scala / bug

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

Links to members on self fail when using -groups #8309

Open scabug opened 10 years ago

scabug commented 10 years ago

Run scaladoc -groups for the following class:

/**
 * See [[boppy]].
 *
 * @groupname stuff Stuff
 */
trait Bippy {
  /**
   * Boppy.
   * @group stuff
   */
  def boppy: Int
}

Clicking on the link to 'boppy' from the trait header does not work because there are duplicate elements with same id for that anchor. This duplicate elements are inside the hidden 'allMembers' element that only shows up with grouping:

<?xml version="1.0"?>
<div id="allMembers" style="display: none;">
  <div id="values" class="values members">
    <h3>Abstract Value Members</h3>
    <ol>
      <li name="Bippy#bar" visbl="pub" data-isabs="true" fullcomment="no" group="stuff">
        <a id="bar:Int"/>
        <a id="bar:Int"/>
        <h4 class="signature">
          <span class="modifier_kind">
            <span class="modifier">abstract </span>
            <span class="kind">val</span>
          </span>
          <span class="symbol">
            <span class="name">bar</span>
            <span class="result">: <span class="extype" name="scala.Int">Int</span></span>
          </span>
        </h4>
        <p class="shortcomment cmt">Bar.</p>
      </li>
      <li name="Bippy#boppy" visbl="pub" data-isabs="true" fullcomment="no" group="stuff">
        <a id="boppy:Int"/>
        <a id="boppy:Int"/>
        <h4 class="signature">
          <span class="modifier_kind">
            <span class="modifier">abstract </span>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span class="name">boppy</span>
            <span class="result">: <span class="extype" name="scala.Int">Int</span></span>
          </span>
        </h4>
        <p class="shortcomment cmt">Boppy.</p>
      </li>
    </ol>
  </div>
  <div id="values" class="values members" style="display: none;">
    <h3>Concrete Value Members</h3>
    <ol>
      <li name="scala.AnyRef#!=" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="!=(x$1:AnyRef):Boolean"/>
        <a id="!=(AnyRef):Boolean"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier">final </span>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span title="gt4s: $bang$eq" class="name">!=</span>
            <span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span>
            <span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>AnyRef</dd>
          </dl>
        </div>
      </li>
      <li name="scala.Any#!=" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="!=(x$1:Any):Boolean"/>
        <a id="!=(Any):Boolean"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier">final </span>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span title="gt4s: $bang$eq" class="name">!=</span>
            <span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span>
            <span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>Any</dd>
          </dl>
        </div>
      </li>
      <li name="scala.AnyRef###" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="##():Int"/>
        <a id="##():Int"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier">final </span>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span title="gt4s: $hash$hash" class="name">##</span>
            <span class="params">()</span>
            <span class="result">: <span class="extype" name="scala.Int">Int</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>AnyRef &#x2192; Any</dd>
          </dl>
        </div>
      </li>
      <li name="scala.AnyRef#==" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="==(x$1:AnyRef):Boolean"/>
        <a id="==(AnyRef):Boolean"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier">final </span>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span title="gt4s: $eq$eq" class="name">==</span>
            <span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span>
            <span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>AnyRef</dd>
          </dl>
        </div>
      </li>
      <li name="scala.Any#==" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="==(x$1:Any):Boolean"/>
        <a id="==(Any):Boolean"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier">final </span>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span title="gt4s: $eq$eq" class="name">==</span>
            <span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span>
            <span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>Any</dd>
          </dl>
        </div>
      </li>
      <li name="scala.Any#asInstanceOf" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="asInstanceOf[T0]:T0"/>
        <a id="asInstanceOf[T0]:T0"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier">final </span>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span class="name">asInstanceOf</span>
            <span class="tparams">[<span name="T0">T0</span>]</span>
            <span class="result">: <span class="extype" name="scala.Any.asInstanceOf.T0">T0</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>Any</dd>
          </dl>
        </div>
      </li>
      <li name="scala.AnyRef#clone" visbl="prt" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="clone():Object"/>
        <a id="clone():AnyRef"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier"/>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span class="name">clone</span>
            <span class="params">()</span>
            <span class="result">: <span class="extype" name="scala.AnyRef">AnyRef</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Attributes</dt>
            <dd>protected[<a href="java$lang.html" class="extype" name="java.lang">java.lang</a>] </dd>
            <dt>Definition Classes</dt>
            <dd>AnyRef</dd>
            <dt>Annotations</dt>
            <dd>
              <span class="name">@throws</span>
              <span class="args">(<span><span class="defval" name="classOf[java.lang.CloneNotSupportedException]">...</span></span>)</span>
            </dd>
          </dl>
        </div>
      </li>
      <li name="scala.AnyRef#eq" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="eq(x$1:AnyRef):Boolean"/>
        <a id="eq(AnyRef):Boolean"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier">final </span>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span class="name">eq</span>
            <span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span>
            <span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>AnyRef</dd>
          </dl>
        </div>
      </li>
      <li name="scala.AnyRef#equals" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="equals(x$1:Any):Boolean"/>
        <a id="equals(Any):Boolean"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier"/>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span class="name">equals</span>
            <span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span>
            <span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>AnyRef &#x2192; Any</dd>
          </dl>
        </div>
      </li>
      <li name="scala.AnyRef#finalize" visbl="prt" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="finalize():Unit"/>
        <a id="finalize():Unit"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier"/>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span class="name">finalize</span>
            <span class="params">()</span>
            <span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Attributes</dt>
            <dd>protected[<a href="java$lang.html" class="extype" name="java.lang">java.lang</a>] </dd>
            <dt>Definition Classes</dt>
            <dd>AnyRef</dd>
            <dt>Annotations</dt>
            <dd>
              <span class="name">@throws</span>
              <span class="args">(<span><span class="symbol">classOf[java.lang.Throwable]</span></span>)</span>
            </dd>
          </dl>
        </div>
      </li>
      <li name="scala.AnyRef#getClass" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="getClass():Class[_]"/>
        <a id="getClass():Class[_]"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier">final </span>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span class="name">getClass</span>
            <span class="params">()</span>
            <span class="result">: <span class="extype" name="java.lang.Class">Class</span>[_]</span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>AnyRef &#x2192; Any</dd>
          </dl>
        </div>
      </li>
      <li name="scala.AnyRef#hashCode" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="hashCode():Int"/>
        <a id="hashCode():Int"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier"/>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span class="name">hashCode</span>
            <span class="params">()</span>
            <span class="result">: <span class="extype" name="scala.Int">Int</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>AnyRef &#x2192; Any</dd>
          </dl>
        </div>
      </li>
      <li name="scala.Any#isInstanceOf" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="isInstanceOf[T0]:Boolean"/>
        <a id="isInstanceOf[T0]:Boolean"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier">final </span>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span class="name">isInstanceOf</span>
            <span class="tparams">[<span name="T0">T0</span>]</span>
            <span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>Any</dd>
          </dl>
        </div>
      </li>
      <li name="scala.AnyRef#ne" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="ne(x$1:AnyRef):Boolean"/>
        <a id="ne(AnyRef):Boolean"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier">final </span>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span class="name">ne</span>
            <span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span>
            <span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>AnyRef</dd>
          </dl>
        </div>
      </li>
      <li name="scala.AnyRef#notify" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="notify():Unit"/>
        <a id="notify():Unit"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier">final </span>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span class="name">notify</span>
            <span class="params">()</span>
            <span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>AnyRef</dd>
          </dl>
        </div>
      </li>
      <li name="scala.AnyRef#notifyAll" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="notifyAll():Unit"/>
        <a id="notifyAll():Unit"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier">final </span>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span class="name">notifyAll</span>
            <span class="params">()</span>
            <span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>AnyRef</dd>
          </dl>
        </div>
      </li>
      <li name="scala.AnyRef#synchronized" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="synchronized[T0](x$1:=&gt;T0):T0"/>
        <a id="synchronized[T0](&#x21D2;T0):T0"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier">final </span>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span class="name">synchronized</span>
            <span class="tparams">[<span name="T0">T0</span>]</span>
            <span class="params">(<span name="arg0">arg0: &#x21D2; <span class="extype" name="java.lang.AnyRef.synchronized.T0">T0</span></span>)</span>
            <span class="result">: <span class="extype" name="java.lang.AnyRef.synchronized.T0">T0</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>AnyRef</dd>
          </dl>
        </div>
      </li>
      <li name="scala.AnyRef#toString" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="toString():String"/>
        <a id="toString():String"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier"/>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span class="name">toString</span>
            <span class="params">()</span>
            <span class="result">: <span class="extype" name="java.lang.String">String</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>AnyRef &#x2192; Any</dd>
          </dl>
        </div>
      </li>
      <li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="wait():Unit"/>
        <a id="wait():Unit"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier">final </span>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span class="name">wait</span>
            <span class="params">()</span>
            <span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>AnyRef</dd>
            <dt>Annotations</dt>
            <dd>
              <span class="name">@throws</span>
              <span class="args">(<span><span class="defval" name="classOf[java.lang.InterruptedException]">...</span></span>)</span>
            </dd>
          </dl>
        </div>
      </li>
      <li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="wait(x$1:Long,x$2:Int):Unit"/>
        <a id="wait(Long,Int):Unit"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier">final </span>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span class="name">wait</span>
            <span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Long">Long</span></span>, <span name="arg1">arg1: <span class="extype" name="scala.Int">Int</span></span>)</span>
            <span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>AnyRef</dd>
            <dt>Annotations</dt>
            <dd>
              <span class="name">@throws</span>
              <span class="args">(<span><span class="defval" name="classOf[java.lang.InterruptedException]">...</span></span>)</span>
            </dd>
          </dl>
        </div>
      </li>
      <li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullcomment="yes" group="Ungrouped" style="display: none;">
        <a id="wait(x$1:Long):Unit"/>
        <a id="wait(Long):Unit"/>
        <h4 class="signature closed">
          <span class="modifier_kind">
            <span class="modifier">final </span>
            <span class="kind">def</span>
          </span>
          <span class="symbol">
            <span class="name">wait</span>
            <span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Long">Long</span></span>)</span>
            <span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
          </span>
        </h4>
        <div class="fullcomment">
          <dl class="attributes block">
            <dt>Definition Classes</dt>
            <dd>AnyRef</dd>
            <dt>Annotations</dt>
            <dd>
              <span class="name">@throws</span>
              <span class="args">(<span><span class="defval" name="classOf[java.lang.InterruptedException]">...</span></span>)</span>
            </dd>
          </dl>
        </div>
      </li>
    </ol>
  </div>
</div>
scabug commented 10 years ago

Imported From: https://issues.scala-lang.org/browse/SI-8309?orig=1 Reporter: Matt Hughes (mhughes) Affected Versions: 2.10.3