summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala2
-rw-r--r--test/scaladoc/resources/SI_4641.scala3
-rw-r--r--test/scaladoc/scala/html/HtmlFactoryTest.scala7
3 files changed, 11 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala b/src/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala
index 3d3d3d7876..ef3c2beffb 100755
--- a/src/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala
+++ b/src/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala
@@ -25,7 +25,7 @@ object IndexModelFactory {
def addMember(d: MemberEntity) = {
val firstLetter = {
val ch = d.name.head.toLower
- if(ch.isLetterOrDigit) ch else '#'
+ if(ch.isLetterOrDigit) ch else '_'
}
val letter = this.get(firstLetter).getOrElse {
immutable.SortedMap[String, SortedSet[MemberEntity]]()
diff --git a/test/scaladoc/resources/SI_4641.scala b/test/scaladoc/resources/SI_4641.scala
new file mode 100644
index 0000000000..a5557a78d9
--- /dev/null
+++ b/test/scaladoc/resources/SI_4641.scala
@@ -0,0 +1,3 @@
+object Foo {
+ def ### = 123
+}
diff --git a/test/scaladoc/scala/html/HtmlFactoryTest.scala b/test/scaladoc/scala/html/HtmlFactoryTest.scala
index cb31df3fb2..c85429e353 100644
--- a/test/scaladoc/scala/html/HtmlFactoryTest.scala
+++ b/test/scaladoc/scala/html/HtmlFactoryTest.scala
@@ -306,4 +306,11 @@ object Test extends Properties("HtmlFactory") {
case _ => false
}
}
+
+ property("SI-4641") = {
+ createReferenceIndex("SI_4641.scala") match {
+ case Some(pages) => pages.contains("index/index-_.html")
+ case _ => false
+ }
+ }
}