summaryrefslogtreecommitdiff
path: root/test/scaladoc/resources
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-10-18 15:11:06 -0700
committerPaul Phillips <paulp@improving.org>2012-10-19 09:04:19 -0700
commit3fea5453b6a6c9451ecd6d0a93b92432b575e6cb (patch)
tree6e010951cdd253747afe18912547ca6d3fce2e6e /test/scaladoc/resources
parent32d470d61195cbf092614711b27db396d0d54a40 (diff)
parent87c5895d4bae62f1b5bacbd145f2e0fddcccf423 (diff)
downloadscala-3fea5453b6a6c9451ecd6d0a93b92432b575e6cb.tar.gz
scala-3fea5453b6a6c9451ecd6d0a93b92432b575e6cb.tar.bz2
scala-3fea5453b6a6c9451ecd6d0a93b92432b575e6cb.zip
Merge remote-tracking branch 'origin/2.10.x' into merge-210
* origin/2.10.x: (52 commits) JavaUniverse Moved @contentDiagram in Symbols Adds lots of new documentation for TypeTags, Mirrors, Universes and more runtime.JavaUniverse - put ungrouped members at the top Forgotten annotation in Annotations Diagram tweaking Grouping for reflection and macros fixes a typo scala.reflect.api.Symbols documentation Symbols docs cleanup, mostly moved to guide scala.reflect.api.Position documentation scala.reflect.api.StandardNames documentation scala.reflect.api.Constants documentation removed docs for internal TypeCreator and TreeCreator simplified reflection docs for trees Rearranged some reflection docs, moving things to the guide reflection docs improvements and moves to doc page docs for reflection and macros SI-6509 Correct @template owners SI-6155 Scaladoc @template diagrms ... Conflicts: src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/reflect/scala/reflect/api/Trees.scala test/scaladoc/run/links.scala
Diffstat (limited to 'test/scaladoc/resources')
-rw-r--r--test/scaladoc/resources/SI-6509.scala24
-rw-r--r--test/scaladoc/resources/SI-6511.scala24
-rw-r--r--test/scaladoc/resources/links.scala14
3 files changed, 61 insertions, 1 deletions
diff --git a/test/scaladoc/resources/SI-6509.scala b/test/scaladoc/resources/SI-6509.scala
new file mode 100644
index 0000000000..540ba243bd
--- /dev/null
+++ b/test/scaladoc/resources/SI-6509.scala
@@ -0,0 +1,24 @@
+package test.scaladoc.template.owners
+
+trait X {
+ /** @template */
+ type Symbol >: Null <: SymbolApi
+
+ /** @template */
+ type TypeSymbol >: Null <: Symbol with TypeSymbolApi
+
+ /** @template */
+ type TermSymbol >: Null <: Symbol with TermSymbolApi
+
+ /** @template */
+ type MethodSymbol >: Null <: TermSymbol with MethodSymbolApi
+
+ trait SymbolApi { this: Symbol => def x: Int}
+ trait TermSymbolApi extends SymbolApi { this: TermSymbol => def y: Int}
+ trait TypeSymbolApi extends SymbolApi { this: TypeSymbol => def z: Int}
+ trait MethodSymbolApi extends TermSymbolApi { this: MethodSymbol => def t: Int }
+}
+
+trait Y extends X
+trait Z extends Y
+trait T extends Z
diff --git a/test/scaladoc/resources/SI-6511.scala b/test/scaladoc/resources/SI-6511.scala
new file mode 100644
index 0000000000..1f153caeb0
--- /dev/null
+++ b/test/scaladoc/resources/SI-6511.scala
@@ -0,0 +1,24 @@
+package test.scaladoc.template.diagrams
+
+/** @contentDiagram hideNodes "*Api" */
+trait X {
+ /** @template */
+ type Symbol >: Null <: SymbolApi
+
+ /** @template */
+ type TypeSymbol >: Null <: Symbol with TypeSymbolApi
+
+ /** @template */
+ type TermSymbol >: Null <: Symbol with TermSymbolApi
+
+ /** @template */
+ type MethodSymbol >: Null <: TermSymbol with MethodSymbolApi
+
+ trait SymbolApi { this: Symbol => def x: Int}
+ trait TermSymbolApi extends SymbolApi { this: TermSymbol => def y: Int}
+ trait TypeSymbolApi extends SymbolApi { this: TypeSymbol => def z: Int}
+ trait MethodSymbolApi extends TermSymbolApi { this: MethodSymbol => def t: Int }
+}
+
+/** @contentDiagram hideNodes "*Api" */
+trait Y extends X
diff --git a/test/scaladoc/resources/links.scala b/test/scaladoc/resources/links.scala
index 12f03a10d8..ecac9c63cf 100644
--- a/test/scaladoc/resources/links.scala
+++ b/test/scaladoc/resources/links.scala
@@ -3,6 +3,9 @@
// SI-4497 "Links in ScalaDoc - Spec and implementation unsufficient"
// SI-4224 "Wiki-links should support method targets"
// SI-3695 "support non-fully-qualified type links in scaladoc comments"
+// SI-6487 "Scaladoc can't link to inner classes"
+// SI-6495 "Scaladoc won't pick up group name, priority and description from owner chain"
+// SI-6501 "Scaladoc won't link to a @template type T as a template but as a member"
package scala.test.scaladoc.links {
import language.higherKinds
class C
@@ -56,9 +59,18 @@ package scala.test.scaladoc.links {
* - [[localMethod object TEST -> localMethod]] (should use the current template to resolve link instead of inTpl, that's the package)
* - [[#localMethod object TEST -> localMethod]] (should exercise Java-style links to empty members)
* - [[ImOutside class ImOutside (check correct lookup in EmptyPackage)]]
+ * - [[ImOutside.Inner#foo class ImOutside#class Inner#method foo (check correct lookup in EmptyPackage)]]
+ * - [[ImOutside.T class ImOutside#type T (check correct linking to templates)]]
+ * - [[ImOutside.T#foo class ImOutside#type T#method foo (check correct interaction between @template and links)]]
*/
object TEST {
def localMethod = 3
}
}
-class ImOutside
+trait ImOutside {
+ /** @template */
+ type T <: Inner
+ class Inner {
+ def foo: Any
+ }
+}