diff options
author | Vlad Ureche <vlad.ureche@gmail.com> | 2012-07-12 14:24:54 +0200 |
---|---|---|
committer | Vlad Ureche <vlad.ureche@gmail.com> | 2012-07-16 23:41:44 +0200 |
commit | a119ad1ae58723bd2e757ed331a536ff4ae49bdf (patch) | |
tree | 45692e87e13f0870f8b6f928b33ff6668cd46389 /test/scaladoc/run/SI-3314.scala | |
parent | 891769fae541513d68ce7a8e84b7213472c333c9 (diff) | |
download | scala-a119ad1ae58723bd2e757ed331a536ff4ae49bdf.tar.gz scala-a119ad1ae58723bd2e757ed331a536ff4ae49bdf.tar.bz2 scala-a119ad1ae58723bd2e757ed331a536ff4ae49bdf.zip |
SI-4360 Adds prefixes to scaladoc
This was a long-standing issue in scaladoc: It was unable to
disambiguate between entries with the same name. One example is:
immutable.Seq:
trait Seq[+A] extends Iterable[A] with Seq[A] ...
What's that? Seq extends Seq? No, immutable.Seq extends collection.Seq,
but scaladoc was unable to show that. Now it does, depending on the
template you're in. Prefixes are relative and can go back:
-scala.collection.Seq has subclasses *immutable.Seq* and *mutable.Seq*
-scala.immutable.Seq extends *collection.Seq*
Unfortunately the price we pay for this is high, a 20% slowdown in
scaladoc. This is why there is a new flag called -no-prefixes that
disables the prefixes in front of types.
Btw, it also fixes the notorious "booleanValue: This member is added by
an implicit conversion from Boolean to Boolean ...". That's now
java.lang.Boolean, so it becomes clear.
Conflicts:
src/compiler/scala/tools/nsc/doc/model/diagram/DiagramFactory.scala
Diffstat (limited to 'test/scaladoc/run/SI-3314.scala')
-rw-r--r-- | test/scaladoc/run/SI-3314.scala | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/scaladoc/run/SI-3314.scala b/test/scaladoc/run/SI-3314.scala index 665223098a..3b5c658078 100644 --- a/test/scaladoc/run/SI-3314.scala +++ b/test/scaladoc/run/SI-3314.scala @@ -48,15 +48,15 @@ object Test extends ScaladocModelTest { val WeekDayInObject = test2._object("WeekDayObject")._member("WeekDay") val expected = List( - ("isWorkingDay1", "Value", ValueInClass), - ("isWorkingDay2", "Value", ValueInClass), - ("isWorkingDay3", "Value", ValueInTrait), - ("isWorkingDay4", "Value", ValueInTrait), - ("isWorkingDay5", "Value", ValueInObject), + ("isWorkingDay1", "WeekDayClass.Value", ValueInClass), + ("isWorkingDay2", "WeekDayClass.Value", ValueInClass), + ("isWorkingDay3", "WeekDayTrait.Value", ValueInTrait), + ("isWorkingDay4", "WeekDayTrait.Value", ValueInTrait), + ("isWorkingDay5", "WeekDayObject.Value", ValueInObject), ("isWorkingDay6", "WeekDay", WeekDayInObject), - ("isWorkingDay7", "Value", ValueInObject), + ("isWorkingDay7", "WeekDayObject.Value", ValueInObject), ("isWorkingDay8", "WeekDay", WeekDayInObject), - ("isWorkingDay9", "Value", ValueInObject)) + ("isWorkingDay9", "WeekDayObject.Value", ValueInObject)) for ((method, name, ref) <- expected) { assert(doc._method(method).valueParams(0)(0).resultType.name == name, |