diff options
author | Kato Kazuyoshi <kato.kazuyoshi@gmail.com> | 2011-07-25 14:04:01 +0000 |
---|---|---|
committer | Kato Kazuyoshi <kato.kazuyoshi@gmail.com> | 2011-07-25 14:04:01 +0000 |
commit | ac2ecfb3af887f8d9ac57af459517fec9b615cd8 (patch) | |
tree | 6e47f164040fb9cec1ccf9e22f2c6ed3dc23c1ca | |
parent | 8c8e8788fd3769b728150d36faa57671d531624a (diff) | |
download | scala-ac2ecfb3af887f8d9ac57af459517fec9b615cd8.tar.gz scala-ac2ecfb3af887f8d9ac57af459517fec9b615cd8.tar.bz2 scala-ac2ecfb3af887f8d9ac57af459517fec9b615cd8.zip |
Scaladoc should decode symbolic type alias name.
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala | 2 | ||||
-rw-r--r-- | test/scaladoc/resources/SI_4715.scala | 7 | ||||
-rw-r--r-- | test/scaladoc/scala/html/HtmlFactoryTest.scala | 10 |
3 files changed, 18 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala b/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala index 8ae2bcd262..45303744cf 100644 --- a/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala +++ b/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala @@ -595,7 +595,7 @@ class ModelFactory(val global: Global, val settings: doc.Settings) { // } val bSym = normalizeTemplate(aSym) if (bSym.isNonClassType) - nameBuffer append bSym.name + nameBuffer append bSym.decodedName else { val tpl = makeTemplate(bSym) val pos0 = nameBuffer.length diff --git a/test/scaladoc/resources/SI_4715.scala b/test/scaladoc/resources/SI_4715.scala new file mode 100644 index 0000000000..29daf43717 --- /dev/null +++ b/test/scaladoc/resources/SI_4715.scala @@ -0,0 +1,7 @@ +class SI_4715 { + type :+:[X,Y] = Map[X,Y] + val withType: Int :+: Double = error("") + + trait :-:[X,Y] + val withTrait: Int :-: Double = error("") +} diff --git a/test/scaladoc/scala/html/HtmlFactoryTest.scala b/test/scaladoc/scala/html/HtmlFactoryTest.scala index 21bcc29364..4fcd4136d2 100644 --- a/test/scaladoc/scala/html/HtmlFactoryTest.scala +++ b/test/scaladoc/scala/html/HtmlFactoryTest.scala @@ -334,4 +334,14 @@ object Test extends Properties("HtmlFactory") { case _ => false } } + + property("Should decode symbolic type alias name.") = { + createTemplate("SI_4715.scala") match { + case node: scala.xml.Node => { + val html = node.toString + html.contains(">: :+:[<") + } + case _ => false + } + } } |