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):
21
21
else sym.maybeOwner.className
22
22
23
23
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
+ }
25
33
else None
26
34
// TODO: Retrieve string that will match scaladoc anchors
27
35
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class Scaladoc3ExternalLocationProviderIntegrationTest extends ExternalLocationP
33
33
List (" .*scala.*::scaladoc3::https://dotty.epfl.ch/api/" ),
34
34
List (
35
35
" 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 " ,
37
37
" https://dotty.epfl.ch/api/scala/util/matching/Regex$$Match.html"
38
38
)
39
39
)
You can’t perform that action at this time.
0 commit comments