From c6df7ddd0657ace307eaf6d6bf436cbb24e93df4 Mon Sep 17 00:00:00 2001 From: Vlad Ureche Date: Mon, 8 Oct 2012 15:41:20 +0200 Subject: SI-6487 Scaladoc can link to inner classes --- test/scaladoc/resources/links.scala | 11 ++++++++++- test/scaladoc/run/links.scala | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'test/scaladoc') diff --git a/test/scaladoc/resources/links.scala b/test/scaladoc/resources/links.scala index 09a52a4334..0986b4ea90 100644 --- a/test/scaladoc/resources/links.scala +++ b/test/scaladoc/resources/links.scala @@ -3,6 +3,7 @@ // 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" package scala.test.scaladoc.links { import language.higherKinds class C @@ -54,9 +55,17 @@ 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#foo class ImOutside#type T#method foo (check correct interaction between @template and links)]] */ object TEST { def localMethod = 3 } } -class ImOutside \ No newline at end of file +trait ImOutside { + /** @template */ + type T <: Inner + class Inner { + def foo: Any + } +} diff --git a/test/scaladoc/run/links.scala b/test/scaladoc/run/links.scala index de359539cf..0f3e749dea 100644 --- a/test/scaladoc/run/links.scala +++ b/test/scaladoc/run/links.scala @@ -22,7 +22,7 @@ object Test extends ScaladocModelTest { val memberLinks = countLinks(TEST.comment.get, _.link.isInstanceOf[LinkToMember]) val templateLinks = countLinks(TEST.comment.get, _.link.isInstanceOf[LinkToTpl]) - assert(memberLinks == 15, memberLinks + " == 15 (the member links in object TEST)") + assert(memberLinks == 17, memberLinks + " == 17 (the member links in object TEST)") assert(templateLinks == 5, templateLinks + " == 5 (the template links in object TEST)") } } \ No newline at end of file -- cgit v1.2.3