Permalink
Browse files

Fix broken links with names that need to be encoded when querying the…

… owner.
  • Loading branch information...
vigdorchik committed Oct 4, 2012
1 parent d85224b commit ca89fb9221b4b96fca9d72292dbe46b4bb0ce326
@@ -173,7 +173,7 @@ trait MemberLookup {
// and removing NoType classes
def cleanupBogusClasses(syms: List[Symbol]) = { syms.filter(_.info != NoType) }
- def syms(name: Name) = container.info.nonPrivateMember(name).alternatives
+ def syms(name: Name) = container.info.nonPrivateMember(name.encodedName).alternatives
def termSyms = cleanupBogusClasses(syms(newTermName(name)))
def typeSyms = cleanupBogusClasses(syms(newTypeName(name)))
@@ -22,6 +22,7 @@ package scala.test.scaladoc.links {
object Target {
type T = Int => Int
type S = Int
+ type ::[X] = scala.collection.immutable.::[X]
class C
def foo(i: Int) = 2
def foo(z: String) = 3
@@ -43,6 +44,7 @@ package scala.test.scaladoc.links {
* - [[[[Target!.foo[A[_[_]]]* trait Target -> def foo with 3 nested tparams]]]] (should exercise nested parens)
* - [[Target$.T object Target -> type T]]
* - [[Target$.S object Target -> type S]]
+ * - [[Target$.:: object Target -> type ::]]
* - [[Target$.foo(z:Str* object Target -> def foo]]
* - [[Target$.bar object Target -> def bar]]
* - [[[[Target$.foo[A[_[_]]]* trait Target -> def foo with 3 nested tparams]]]] (should exercise nested parens)
@@ -59,4 +61,4 @@ package scala.test.scaladoc.links {
def localMethod = 3
}
}
-class ImOutside
+class ImOutside
@@ -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 == 16, memberLinks + " == 16 (the member links in object TEST)")
assert(templateLinks == 5, templateLinks + " == 5 (the template links in object TEST)")
}
-}
+}

0 comments on commit ca89fb9

Please sign in to comment.