File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
src/dotty/tools/scaladoc/tasty
test/dotty/tools/scaladoc Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,15 @@ class SymOps[Q <: Quotes](val q: Q):
2121 else sym.maybeOwner.className
2222
2323 def anchor : Option [String ] =
24- if (! sym.isClassDef && ! sym.isPackageDef) Some (sym.name)
24+ if (! sym.isClassDef && ! sym.isPackageDef) {
25+ val params = sym.signature.paramSigs.map {
26+ case s : String => s
27+ case i : Int => i.toString
28+ }
29+ val result = sym.signature.resultSig
30+ val hash = ((params.mkString + result).hashCode % 4096 ).toHexString
31+ Some (s " ${sym.name}- $hash" )
32+ }
2533 else None
2634 // TODO: Retrieve string that will match scaladoc anchors
2735
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class Scaladoc3ExternalLocationProviderIntegrationTest extends ExternalLocationP
3333 List (" .*scala.*::scaladoc3::https://dotty.epfl.ch/api/" ),
3434 List (
3535 " https://dotty.epfl.ch/api/scala/collection/immutable/Map.html" ,
36- " https://dotty.epfl.ch/api/scala/Predef$.html#String" ,
36+ " https://dotty.epfl.ch/api/scala/Predef$.html#String-0 " ,
3737 " https://dotty.epfl.ch/api/scala/util/matching/Regex$$Match.html"
3838 )
3939)
You can’t perform that action at this time.
0 commit comments