summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Iry <jamesiry@gmail.com>2013-02-01 09:10:04 -0800
committerJames Iry <jamesiry@gmail.com>2013-02-01 09:10:04 -0800
commitd3886086c317acdaccaf0d40d69463b444947cc9 (patch)
treedb3958b5d24f62fd771c6ac9b7aefd2bb5c5517d
parent06295f9682b3292b9fca367a559c000fcf0c782d (diff)
parent485d815dbada76f1a25c97814d48113909d9cd3a (diff)
downloadscala-d3886086c317acdaccaf0d40d69463b444947cc9.tar.gz
scala-d3886086c317acdaccaf0d40d69463b444947cc9.tar.bz2
scala-d3886086c317acdaccaf0d40d69463b444947cc9.zip
Merge pull request #1909 from kzys/jira-6017-2.10.x
SI-6017 Scaladoc's Index should be case-sensitive
-rwxr-xr-xsrc/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala2
-rw-r--r--test/scaladoc/run/SI-6017.check1
-rw-r--r--test/scaladoc/run/SI-6017.scala23
3 files changed, 25 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 10e2f23142..4ee6daf73e 100755
--- a/src/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala
+++ b/src/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala
@@ -20,7 +20,7 @@ object IndexModelFactory {
/* Owner template ordering */
implicit def orderingSet = math.Ordering.String.on { x: MemberEntity => x.name.toLowerCase }
/* symbol name ordering */
- implicit def orderingMap = math.Ordering.String.on { x: String => x.toLowerCase }
+ implicit def orderingMap = math.Ordering.String
def addMember(d: MemberEntity) = {
val firstLetter = {
diff --git a/test/scaladoc/run/SI-6017.check b/test/scaladoc/run/SI-6017.check
new file mode 100644
index 0000000000..619c56180b
--- /dev/null
+++ b/test/scaladoc/run/SI-6017.check
@@ -0,0 +1 @@
+Done.
diff --git a/test/scaladoc/run/SI-6017.scala b/test/scaladoc/run/SI-6017.scala
new file mode 100644
index 0000000000..a4950e48d8
--- /dev/null
+++ b/test/scaladoc/run/SI-6017.scala
@@ -0,0 +1,23 @@
+import scala.tools.nsc.doc
+import scala.tools.nsc.doc.model._
+import scala.tools.nsc.doc.html.page.{Index, ReferenceIndex}
+import scala.tools.partest.ScaladocModelTest
+
+object Test extends ScaladocModelTest {
+ override def scaladocSettings = ""
+ override def code = """
+ class STAR
+ class Star
+ """
+
+ def testModel(rootPackage: Package) {
+ model match {
+ case Some(universe) => {
+ val index = IndexModelFactory.makeIndex(universe)
+ // Because "STAR" and "Star" are different
+ assert(index.firstLetterIndex('s').keys.toSeq.length == 2)
+ }
+ case _ => assert(false)
+ }
+ }
+}