summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala3
-rw-r--r--test/scaladoc/resources/SI-8514.scala10
-rw-r--r--test/scaladoc/scalacheck/HtmlFactoryTest.scala14
3 files changed, 24 insertions, 3 deletions
diff --git a/src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala b/src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala
index 26ee005d3e..11a962038a 100644
--- a/src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala
+++ b/src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala
@@ -306,9 +306,6 @@ class Template(universe: doc.Universe, generator: DiagramGenerator, tpl: DocTemp
<xml:group>
<div id="comment" class="fullcommenttop">{ memberToCommentBodyHtml(mbr, inTpl, isSelf = true) }</div>
</xml:group>
- case dte: DocTemplateEntity if mbr.comment.isDefined =>
- // comment of inner, documented class (only short comment, full comment is on the class' own page)
- memberToInlineCommentHtml(mbr, isSelf)
case _ =>
// comment of non-class member or non-documentented inner class
val commentBody = memberToCommentBodyHtml(mbr, inTpl, isSelf = false)
diff --git a/test/scaladoc/resources/SI-8514.scala b/test/scaladoc/resources/SI-8514.scala
new file mode 100644
index 0000000000..4c5476604b
--- /dev/null
+++ b/test/scaladoc/resources/SI-8514.scala
@@ -0,0 +1,10 @@
+package a {
+ class DeveloperApi extends scala.annotation.StaticAnnotation
+
+ /** Some doc here */
+ @DeveloperApi
+ class A
+
+ @DeveloperApi
+ class B
+}
diff --git a/test/scaladoc/scalacheck/HtmlFactoryTest.scala b/test/scaladoc/scalacheck/HtmlFactoryTest.scala
index 56328ea875..3ee8fd9303 100644
--- a/test/scaladoc/scalacheck/HtmlFactoryTest.scala
+++ b/test/scaladoc/scalacheck/HtmlFactoryTest.scala
@@ -740,5 +740,19 @@ object Test extends Properties("HtmlFactory") {
case node: scala.xml.Node => true
case _ => false
}
+
+ property("SI-8514: No inconsistencies") =
+ checkText("SI-8514.scala")(
+ (Some("a/package"),
+ """class A extends AnyRef
+ Some doc here
+ Some doc here
+ Annotations @DeveloperApi()
+ """, true),
+ (Some("a/package"),
+ """class B extends AnyRef
+ Annotations @DeveloperApi()
+ """, true)
+ )
}
}