aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dottydoc/jvm/src/dotty/tools/dottydoc/html/EntityPage.scala5
-rw-r--r--dottydoc/jvm/test/WhitelistedStdLib.scala15
2 files changed, 18 insertions, 2 deletions
diff --git a/dottydoc/jvm/src/dotty/tools/dottydoc/html/EntityPage.scala b/dottydoc/jvm/src/dotty/tools/dottydoc/html/EntityPage.scala
index b3f5b5d53..8bbc73db8 100644
--- a/dottydoc/jvm/src/dotty/tools/dottydoc/html/EntityPage.scala
+++ b/dottydoc/jvm/src/dotty/tools/dottydoc/html/EntityPage.scala
@@ -75,8 +75,9 @@ case class EntityPage(entity: Entity, packages: Map[String, Package]) {
)
)
- private def filteredName(str: String) =
- str.replaceAll("\\$colon", ":")
+ private def filteredName(str: String) = str
+ .replaceAll("\\$colon", ":")
+ .replaceAll("\\$plus", "+")
private def relativePath(to: Entity) =
util.traversing.relativePath(entity, to)
diff --git a/dottydoc/jvm/test/WhitelistedStdLib.scala b/dottydoc/jvm/test/WhitelistedStdLib.scala
index bbf0b4c6b..88dc67e99 100644
--- a/dottydoc/jvm/test/WhitelistedStdLib.scala
+++ b/dottydoc/jvm/test/WhitelistedStdLib.scala
@@ -14,4 +14,19 @@ class TestWhitelistedCollections extends DottyTest {
assert(array.comment.get.body.length > 0)
}
+
+ @Test def traitImmutableHasDocumentation =
+ checkFiles(WhitelistedStandardLib.files) { doc =>
+ val imm = doc
+ .packages("scala")
+ .children.find(_.path.mkString(".") == "scala.Immutable")
+ .get
+
+ assert(
+ imm.kind == "trait" && imm.name == "Immutable",
+ "Found wrong `Immutable`")
+ assert(
+ imm.comment.map(_.body).get.length > 0,
+ "Imm did not have a comment with length > 0")
+ }
}